Вы находитесь на странице: 1из 6

1.

Find order of characters in a sorted dictionary of alien language


http://www.geeksforgeeks.org/given-sorted-dictionary-find-precedence-characters/

2. Total occurrence of a number in sorted array


http://www.geeksforgeeks.org/count-number-of-occurrences-in-a-sorted-array/

3. Merge k sorted arrays


http://www.geeksforgeeks.org/merge-k-sorted-arrays/

4. Minimum operations required to convert String1 to String2 (add,delete,replace)


http://www.geeksforgeeks.org/dynamic-programming-set-5-edit-distance/

5. Number of occurrence of a word in 2D array


http://www.geeksforgeeks.org/find-all-occurrences-of-the-word-in-a-matrix/

6. Number of occurrence of a word in string


->Use HashMap

7. Least common ancestor in n-ary tree


http://qa.geeksforgeeks.org/721/lca-of-n-ary-tree

8. Distance between 2 given nodes in a binary tree


http://www.geeksforgeeks.org/find-distance-two-given-nodes/

9. Longest common subsequence


http://www.geeksforgeeks.org/dynamic-programming-set-4-longest-common-
subsequence/

10. Find first non-repeating character in a string


http://www.geeksforgeeks.org/given-a-string-find-its-first-non-repeating-character/

11. Level order traversal of a binary tree in spiral form


http://www.geeksforgeeks.org/level-order-traversal-in-spiral-form/

12. Sort an array containing 0,1 & 2


http://www.geeksforgeeks.org/sort-an-array-of-0s-1s-and-2s/

13. Find a pair with given sum in Binary Search Tree


http://www.geeksforgeeks.org/find-a-pair-with-given-sum-in-bst/

14. Find a triplet that adds to 0 in BST


http://www.geeksforgeeks.org/find-if-there-is-a-triplet-in-bst-that-adds-to-0/

15. Merge overlapping intervals


http://www.geeksforgeeks.org/merging-intervals/
16. Implement LRU
http://www.geeksforgeeks.org/implement-lru-cache/

17. Clone an binary tree


http://www.geeksforgeeks.org/clone-binary-tree-random-pointers/

18. Clone a linked list


http://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/

19. Convert string to number based on keypad

20. 2 Nodes of a BST are swapped , correct the BST


http://www.geeksforgeeks.org/fix-two-swapped-nodes-of-bst/

21. Trapping rain water


http://www.geeksforgeeks.org/trapping-rain-water/

22. Buy sell stocks to maximize profit


http://www.geeksforgeeks.org/maximum-profit-by-buying-and-selling-a-share-at-most-k-
times/

23. Print all anagrams of a given string


http://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-
string/

24. Given a sequence of words , print all anagrams together


http://www.geeksforgeeks.org/given-a-sequence-of-words-print-all-anagrams-together/

25. Given 2 strings , print all permutations such that order is maintained
http://www.geeksforgeeks.org/print-all-interleavings-of-given-two-strings/

26. Longest palindromic subsequence in a string


http://www.geeksforgeeks.org/dynamic-programming-set-12-longest-palindromic-
subsequence/

27. Longest palindromic substring in a string


http://www.geeksforgeeks.org/longest-palindrome-substring-set-1/

28. Remove all elements in a linked list that sum up to zero


29. Max sum contiguous sub-array
http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/

30. Find a,b,c,d in an array such that a+b=c+d


http://www.geeksforgeeks.org/find-four-elements-a-b-c-and-d-in-an-array-such-that-ab-cd/

31. Find longest substring with k unique characters


http://www.geeksforgeeks.org/find-the-longest-substring-with-k-unique-characters-in-a-
given-string/

32. Dijkstras Algorithm


http://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-path-algorithm/

33. Top view of binary tree


http://www.geeksforgeeks.org/print-nodes-top-view-binary-tree/

34. Bottom view of binary tree


http://www.geeksforgeeks.org/bottom-view-binary-tree/

35. K largest in an array


http://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array/

36. Find peak point in an array


http://www.geeksforgeeks.org/find-a-peak-in-a-given-array/

37. Find smallest positive missing element from an array


http://www.geeksforgeeks.org/find-the-smallest-positive-number-missing-from-an-
unsorted-array/

38. For value n , print all valid parenthesis


http://www.geeksforgeeks.org/print-all-combinations-of-balanced-parentheses/

39. Convert Linked List : 1-2-3-4-5-6 to 1-6-2-5-3-4


http://www.geeksforgeeks.org/rearrange-a-given-linked-list-in-place/

40. Connect n ropes such that cost is minimized


http://www.geeksforgeeks.org/connect-n-ropes-minimum-cost/

41. Find Pythagorean triplet in an array


http://www.geeksforgeeks.org/find-pythagorean-triplet-in-an-unsorted-array/
42. 1234 in words
http://www.geeksforgeeks.org/convert-number-to-words/

43. De-serialize and serialize binary tree


http://www.geeksforgeeks.org/serialize-deserialize-binary-tree/

44. Check if a given binary tree is BST or not


http://www.geeksforgeeks.org/a-program-to-check-if-a-binary-tree-is-bst-or-not/

45. Producer consumer problem


http://www.geeksforgeeks.org/producer-consumer-solution-using-threads-java/

46. Check if 2 trees are mirror


http://www.geeksforgeeks.org/check-if-two-trees-are-mirror/

47. Implement contact suggestions


http://www.geeksforgeeks.org/implement-a-phone-directory/

48. In a stream of positive Integers ,tell whether 2 numbers with sum 10 came or not
->Using array of size 10

49. Reverse in group of k in linked list


http://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/

50. Reverse alternate k elements in linked list


http://www.geeksforgeeks.org/reverse-alternate-k-nodes-in-a-singly-linked-list/

51. Implement a data structure such that for every operation time complexity is O(1) ,
operations-> Insert , delete, search , get Random
http://stackoverflow.com/questions/5682218/data-structure-insert-remove-contains-get-
random-element-all-at-o1

52. Find all pairs in an array , duplicates can be present

53. In an array of 0s and 1s find longest 1s streak by flipping m 0s


http://www.waytocrack.com/forum/166/longest-continuous-streak-of-1s-after-flipping-m-
0s-to-1s

54. Inversions in an array


http://www.geeksforgeeks.org/counting-inversions/

55. 1->A 2->B 3->C .. , find string from given number


56. Check if one binary tree is sub-tree of other binary tree
http://www.geeksforgeeks.org/check-if-a-binary-tree-is-subtree-of-another-binary-tree/

57. Largest rectangular area in a histogram


http://www.geeksforgeeks.org/largest-rectangular-area-in-a-histogram-set-1/

58. Max sum path in 2 sorted arrays


http://www.geeksforgeeks.org/maximum-sum-path-across-two-arrays/

59. Maximize N by maximum k swaps of adjacent digits


http://www.geeksforgeeks.org/find-maximum-number-possible-by-doing-at-most-k-swaps/

60. Postfix, prefix ,infix


http://quiz.geeksforgeeks.org/stack-set-2-infix-to-postfix/
http://www.geeksforgeeks.org/expression-evaluation/

61. Maximum triangle path sum


https://rosettacode.org/wiki/Maximum_triangle_path_sum

62. Move all zeroes to end


http://www.geeksforgeeks.org/move-zeroes-end-array/

63. Check if 2 rectangles overlap or not


http://www.geeksforgeeks.org/find-two-rectangles-overlap/

64. Search element in sorted rotated array


http://www.geeksforgeeks.org/search-an-element-in-a-sorted-and-pivoted-array/

65. Merge 2 binary search trees


http://www.geeksforgeeks.org/merge-two-balanced-binary-search-trees/

66. Longest valid substring containing (,)


http://www.geeksforgeeks.org/length-of-the-longest-valid-substring/

67. Articulation points in graph


http://www.geeksforgeeks.org/articulation-points-or-cut-vertices-in-a-graph/

68. Connect siblings in a tree


http://www.geeksforgeeks.org/connect-nodes-at-same-level/

69. LIS variations


http://www.geeksforgeeks.org/dynamic-programming-set-14-variations-of-lis/
70. Print all nodes at k distance from a given node in binary tree
http://www.geeksforgeeks.org/print-nodes-distance-k-given-node-binary-tree/

Вам также может понравиться