Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Algorithms — Array Problems

  1. Depth First Search/Traversal in Binary Tree
  2. Check if Array is Con­sec­u­tive Integers
  3. In an Array, find the Con­tigu­ous Sub­ar­ray with Sum to a Given Value.
  4. In an Array, find the Small­est Sub­ar­ray with Sum Greater than the Given Value
  5. Rearrange Pos­i­tive and Neg­a­tive Ele­ments at Alter­nate Posi­tions in an Array In O(1) Extra Space
  6. Find inter­sec­tion between Two Sorted Arrays.
  7. Find Kth Small­est or Largest ele­ment in an Array.
  8. Given an array arrA[], find the max­i­mum j – i such that arr[j] > arr[i].
  9. Find All Ele­ments in an Array which appears more than N/K times, N is Array Size and k is a Number.
  10. Search an Ele­ment in a Rotated Sorted Array
  11. Print All The Per­mu­ta­tions Of a String
  12. Sort an Given Array in the order defined by another array
  13. Sort an Array such that the odd num­bers appear first fol­lowed by the even num­bers . The odd num­bers in ascend­ing order and the even num­bers in descend­ing order.
  14. Find the num­ber of occur­rences of a num­ber in a given sorted array.
  15. Find all com­mon num­bers in given three sorted arrays.
  16. Find the first repeated ele­ment in an array by its index
  17. Min­i­mum num­ber that can­not be formed by any sub­set of an array
  18. Sorted Array to Binary Search Tree of Min­i­mal Height
  19. Count All Paths from Top left to bot­tom right in Two Dimen­sional Array includ­ing Diag­o­nal Paths
  20. Print All Paths from Top left to bot­tom right in Two Dimen­sional Array
  21. Rearrange Pos­i­tive and Neg­a­tive Num­bers of Array On Each Side in O(nlogn)
  22. Find The Longest Sequence Of Pre­fix Shared By All The Words In A String
  23. Print All Ele­ments of Two Dimen­sional Array in Spiral
  24. Given an array and a num­ber k, check for pair in array with sum as k in O(nlgn)
  25. Quick Sort Implementation
  26. Find an Ele­ment in 2 dimen­sional sorted array
  27. Find Whether Given String is palin­drome or Not.
  28. Find a peak ele­ment in a Given Array
  29. Find two Miss­ing Num­bers in a Sequence of Con­sec­u­tive Numbers
  30. Find a Miss­ing Num­ber From a Sequence of Con­sec­u­tive Numbers
  31. Merge Sort — Updated — Most Effi­cient ways to Implement
  32. Binary Search