Crack Data Structures and Algorithm interviews to get a job in Best organization -Part 1

in #course7 years ago (edited)

Hi Guys,

I am new to this community and I haven't seen any stuff for cracking interviews to get the job in top companies like
Google,Facebook,Amazon,JPMorgan,Morgan Stanley ,Microsoft,Goldman Sachs,Citrix and many more.
Since, I am working as a Software Developer in one of the top organization I can share some insights to prepare and crack

So, I am sharing some of the most asked interview questions for data structures and algorithm part by part.
I am sharing only questions as of now .So, please comment me if you need to know more materials like solutions and do
add questions which has been asked in top companies

So ,How do I get a job and earn more ?

Part 1- Arrays Most Asked Programming questions

  1. Find a pair in an array of size 'n', whose sum is X
  2. Find a majority element in an array of size 'n'
  3. Find the number occuring odd number of times in a given array of size 'n'
  4. Algorithm to reverse an array
  5. Algorithm to rotate array of size 'n' by 'd' elements
  6. Algorithm to segregate 0's and 1's in an array
  7. Find the maximum difference between two elements such that larger element appears after the smaller element
  8. Algorithm to merge an array of size 'n' into another array of size 'm+n'.
  9. Algorithm to find two repeating numbers in a given array
  10. Algorithm to find duplicate elements in O(n) time and O(1) extra space, for a given array of size 'n'
  11. Find the index in an array such that the sum of elements at lower indices is equal to the sum of elements at higher indices.
  12. Algorithm to find the maximum difference of j - i such that a[j] > a[i], for a given an array of 'n' elements.
  13. Algorithm to find the triplet whose sum is X
  14. Algorithm to find a sub array whose sum is X
  15. Algorithm to find the largest sub array with equal number of 0's and 1's
  16. Algorithm to find the number of triangles that can be formed with three different array elements as three sides of triangles, for a given unsorted array of n elements
  17. Algorithm to find the smallest integer value that can't be represented as sum of any subset of a given array.
  18. Algorithm to find the common element in given three sorted arrays
  19. Algorithm to find the contiguous sub-array with maximum sum, for a given array of postive and negative numbers.
  20. Given an array of integers, sort the array into a wave like array and return it. (arrange the element into a sequence such that a1>=a2<=a3>=a4<=a5----etc.
  21. Algorithm to find the next greater number formed after permuting the digits of given number
  22. Algorithm to find the sum of bit difference in all pairs that can be formed from array of n elements.
  23. Trapping rain water problem
  24. Algorithm to find the minimum number of platforms required for the railway station so that no train waits according to arrival and departure time
  25. Rotate 2-Dimentional array
  26. Lock and Key problem
  27. Rearrange an array so that a[i] becomes a[a[i]] with O(1) extra space
  28. Traverse a matrix of integers in spiral form
  29. Given an array consisting 0's, 1's and 2's, write a algorithm to sort it
  30. Given a positive number X, print all jumping numbers(all adjacent digits in it differ by 1) smaller than or equal to X
  31. Given an array and an integer 'k', find the maximum, for each and every contiguous subarray of size 'k'
  32. Search an element in a sorted rotated array
  33. Find the maximum value of a[j]-a[i]+a[l]-a[k], for every four indices i, j, k, l such that i< j < k < l.

Guys, please share more questions related to arrays and I will add more topics related to other topics and let me know if you like or dislike the stuff.

Thanks for reading now I am signing off.........