Top 40 Dsa Coding Questions Asked In Interview  With Company Name

Top 40 Dsa Coding Questions Asked In Interview With Company Name

  1. Reverse a linked list. (Amazon, Microsoft, Google)

  2. Find the first non-repeating character in a string. (Amazon, Microsoft, Facebook)

  3. Find the intersection of two linked lists. (Amazon, Microsoft, Facebook)

  4. Merge two sorted linked lists. (Amazon, Microsoft, Google)

  5. Implement a queue using two stacks. (Amazon, Microsoft, Google)

  6. Implement a stack using two queues. (Amazon, Microsoft, Google)

  7. Find the kth largest element in an array. (Amazon, Microsoft, Google)

  8. Implement a binary search algorithm. (Amazon, Microsoft, Google)

  9. Implement a binary tree traversal (preorder, inorder, postorder). (Amazon, Microsoft, Google)

  10. Find the maximum sum subarray in an array. (Amazon, Microsoft, Facebook)

  11. Find all permutations of a string. (Amazon, Microsoft, Google)

  12. Implement a heap data structure. (Amazon, Microsoft, Google)

  13. Find the longest common prefix of an array of strings. (Amazon, Microsoft, Google)

  14. Find the maximum depth of a binary tree. (Amazon, Microsoft, Google)

  15. Find the diameter of a binary tree. (Amazon, Microsoft, Google)

  16. Implement a breadth-first search algorithm. (Amazon, Microsoft, Google)

  17. Implement a depth-first search algorithm. (Amazon, Microsoft, Google)

  18. Find the maximum product subarray in an array. (Amazon, Microsoft, Facebook)

  19. Check if a binary tree is a binary search tree. (Amazon, Microsoft, Google)

  20. Implement a LRU cache. (Amazon, Microsoft, Google)

  21. Find the minimum depth of a binary tree. (Amazon, Microsoft, Google)

  22. Find the maximum sum path in a binary tree. (Amazon, Microsoft, Facebook)

  23. Find the minimum element in a rotated sorted array. (Amazon, Microsoft, Google)

  24. Count the number of islands in a matrix. (Amazon, Microsoft, Google)

  25. Implement a trie data structure. (Amazon, Microsoft, Google)

  26. Implement a suffix tree data structure. (Amazon, Microsoft, Google)

  27. Find the minimum window substring of a string. (Amazon, Microsoft, Google)

  28. Check if a linked list is a palindrome. (Amazon, Microsoft, Google)

  29. Reverse a string using recursion. (Amazon, Microsoft, Google)

  30. Implement a quicksort algorithm. (Amazon, Microsoft, Google)

  31. Implement a mergesort algorithm. (Amazon, Microsoft, Google)

  32. Implement a bubble sort algorithm. (Amazon, Microsoft, Google)

  33. Implement a selection sort algorithm. (Amazon, Microsoft, Google)

  34. Implement an insertion sort algorithm. (Amazon, Microsoft, Google)

  35. Implement a radix sort algorithm. (Amazon, Microsoft, Google)

  36. Implement a binary search tree data structure. (Amazon, Microsoft, Google)

  37. Implement a hash table data structure. (Amazon, Microsoft, Google)

  38. Implement a red-black tree data structure. (Amazon, Microsoft, Google)

  39. Implement an AVL tree data structure. (Amazon, Microsoft, Google)

  40. Find the next permutation of a sequence of integers. (Amazon, Microsoft, Google)

Did you find this article valuable?

Support Sawan Kumar Jha by becoming a sponsor. Any amount is appreciated!