Monday, September 25, 2017

Frequently asked Data Structures Questions:

Below are of some of the very popular data structures question which is asked in various companies hirings. These questions are asked from candidates having 2 to 15 years of experience in the industry.

Some sites :

https://letsalgo.com/


  1. Reverse a String using Stack
  2. Sort a stack using recursion
  3. Next Greater Element
  4. Implement Stack using Queues
  5. Largest Rectangular Area in a Histogram
  6. Iterative Postorder Traversal
  7. Iterative Preorder Traversal
  8. Iterative inorder Traversal
  9. Expression evaluation
  10. Reverse a linked list
  11. Detect and Remove Loop in a Linked List
  12. Merge two sorted linked lists
  13. Intersection point of two Linked Lists.
  14. Pairwise swap elements of a given linked list
  15. Merge Sort for Linked Lists
  16. Convert a given Binary Tree to Doubly Linked List
  17. Merge Sort for Doubly Linked List
  18. Implement Queue using Stacks
  19. Implement LRU Cache
  20. Print Postorder traversal from given Inorder and Preorder traversals
  21. Print a Binary Tree in Vertical Order
  22. Boundary Traversal of binary tree
  23. Root to leaf path sum equal to a given number
  24. How to determine if a binary tree is height-balanced?
  25. Write a Program to Find the Maximum Depth or Height of a Tree
  26. Write Code to Determine if Two Trees are Identical
  27. Connect nodes in trees at same level
  28. Print Ancestors of a given node in Binary Tree
  29. Given a binary tree, print all root-to-leaf paths
  30. Vertical Sum in a given Binary Tree
  31. Print Left View of a Binary Tree
  32. Check if all leaves are at same level
  33. Check if a binary tree is subtree of another binary tree
  34. Print Right View of a Binary Tree
  35. Print all nodes at distance k from a given node
  36. Lowest Common Ancestor in a Binary Tree
  37. Print Nodes in Top View of Binary Tree
  38. Maximum Path Sum in a Binary Tree
  39. Diameter of a Binary Tree in O(n)
  40. Inorder predecessor and successor for a given key in BST
  41. Check if a binary tree is BST or not
  42. Lowest Common Ancestor in a Binary Search Tree.
  43. Sorted order printing of a given array that represents a BST
  44. Inorder Successor in Binary Search Tree
  45. Find k-th smallest element in BST
  46. Sorted Linked List to Balanced BST
  47. Check whether two strings are anagram of each other
  48. Print all pairs of anagrams in a given array of strings
  49. Longest Palindromic Substring
  50. Longest Non-palindromic substring
  51. Longest common subsequence
  52. Implementation of atoi()
  53. Detect Cycle in a Directed Graph
  54. Topological Sorting
  55. n-QueenĂ­s Problem
  56. Find the number of islands
  57. Largest Sum Contiguous Subarray
  58. Longest Increasing Subsequence
  59. Maximum Sum Increasing Subsequence
  60. Longest Common Substring

No comments:

Post a Comment