Microsoft Topics for Interview Preparation

    Easy Level

  1. Binary representation of a given number
  2. Find max in struct array
  3. Find if two rectangles overlap
  4. Calculate the difficulty of a sentence
  5. Check if a linked list is Circular Linked List
  6. Converting Decimal Number lying between 1 to 3999 to Roman Numerals
  7. Count distinct elements in every window of size k
  8. Count all possible paths from top left to bottom right of a mXn matrix
  9. Evaluate a boolean expression represented as string
  10. Find common elements in three sorted arrays
  11. Find the number closest to n and divisible by m
  12. Find position of the only set bit
  13. Find the Missing Number
  14. Inplace rotate square matrix by 90 degrees | Set 1
  15. k largest(or smallest) elements in an array | added Min Heap method
  16. Level Order Tree Traversal
  17. Merge Sort
  18. Run Length Encoding
  19. Sort all even numbers in ascending order and then sort all odd numbers in descending order
  20. Square root of an integer
  21. Stack Data Structure (Introduction and Program)
  22. URLify a given string (Replace spaces is %20)
  23. Find the middle of a given linked list in C and Java
  24. Write an Efficient Function to Convert a Binary Tree into its Mirror Tree
  25. Write one line C function to find whether a no is power of two
  26. Write your own atoi()
  27. Add two numbers represented by linked lists | Set 1
  28. Anagram Substring Search (Or Search for all permutations)
  29. Binary Search Tree | Set 1 (Search and Insertion)
  30. Boundary Traversal of binary tree
  31. Breadth First Traversal or BFS for a Graph
  32. Check if binary representation of a number is palindrome
  33. Construct Tree from given Inorder and Preorder traversals
  34. Convert a given tree to its Sum Tree
  35. Converting Roman Numerals to Decimal lying between 1 to 3999
  36. Count Inversions in an array | Set 1 (Using Merge Sort)
  37. Delete middle of linked list
  38. Design a stack that supports getMin() in O(1) time and O(1) extra space
  39. Diameter of a Binary Tree
  40. Dynamic Programming | Set 10 ( 0-1 Knapsack Problem)
  41. Dynamic Programming | Set 15 (Longest Bitonic Subsequence)
  42. Find all strings that match specific pattern in a dictionary
  43. Find Excel column name from a given column number
  44. Find the minimum element in a sorted and rotated array
  45. Find next greater number with same set of digits
  46. Find N'th item in a set formed by sum of two arrays
  47. Find the element that appears once
  48. Find the row with maximum number of 1s
  49. Find the two non-repeating elements in an array of repeating elements
  50. Function to check if a singly linked list is palindrome
  51. Generate n-bit Gray Codes
  52. Given only a pointer/reference to a node to be deleted in a singly lin
  53. How to determine if a binary tree is height-balanced?
  54. Intersection of two Sorted Linked Lists
  55. Length of the longest substring without repeating characters
  56. Level order traversal in spiral form
  57. Lowest Common Ancestor in a Binary Tree | Set 1
  58. Lowest Common Ancestor in a Binary Search Tree.
  59. Majority Element
  60. Maximum Product Subarray
  61. Maximum width of a binary tree
  62. Merge two sorted linked lists such that merged list is in reverse order
  63. Merge two sorted linked lists
  64. Microsoft Interview experience | Set 100 (On Campus for Internship on IDC and IT)
  65. Minimum time required to rot all oranges
  66. Mobile Numeric Keypad Problem
  67. Number of buildings facing the sun
  68. Pairwise swap elements of a given linked list
  69. Print a given matrix in spiral form
  70. Print a pattern without using any loop
  71. Print all Jumping Numbers smaller than or equal to a given value
  72. Print all subarrays with 0 sum
  73. Print BST keys in the given range
  74. Print level order traversal line by line
  75. Print nodes at k distance from root
  76. Print the string by ignoring alternate occurrences of any character
  77. Program to add two binary strings
  78. Program to validate an IP address
  79. Implement Queue using Stacks
  80. Remove all duplicates from a given string
  81. Remove every k-th node of the linked list
  82. Reverse Level Order Traversal
  83. Reverse words in a given string
  84. Root to leaf path sum equal to a given number
  85. Search a Word in a 2D Grid of characters
  86. Search an element in a sorted and rotated array
  87. Sort a linked list of 0s, 1s and 2s
  88. Sort an array of 0s, 1s and 2s
  89. Sorted insert for circular linked list
  90. Stock Buy Sell to Maximize Profit
  91. The Celebrity Problem
  92. Tree Isomorphism Problem
  93. Two elements whose sum is closest to zero
  94. Union and Intersection of two Linked Lists
  95. Given an a
  96. Write a function to reverse a linked list
  97. Write Code to Determine if Two Trees are Identical

Medium Level

  1. A program to check if a binary tree is BST or not
  2. Boggle | Set 2 (Using Trie)
  3. Check if a binary tree is subtree of another binary tree | Set 2
  4. Dynamic Programming | Set 33 (Find if a string is interleaved of two other stri
  5. Clone a linked list with next and random pointer | Set 2
  6. Combinational Sum
  7. Connect nodes at same level
  8. Construct Binary Tree from given Parent Array representation
  9. Program to convert a given number to words
  10. Count number of binary strings without consecutive 1's
  11. Detect and Remove Loop in a Linked List
  12. Detect Cycle in a Directed Graph
  13. Dynamic Programming | Set 22 (Box Stacking Problem)
  14. Dynamic Programming | Set 8 (Matrix Chain Multiplication)
  15. Factorial of a large number
  16. Find the first circular tour that visits all petrol pumps
  17. Find all distinct subsets of a given set
  18. Find Excel column name from a given column number
  19. Find the first non-repeating character from a stream of characters
  20. Find four elements that sum to a given value | Set 2 ( O(n^2Logn) Solution)
  21. Find next greater number with same set of digits
  22. Find the number of islands | Set 1 (Using DFS)
  23. Flattening a Linked List
  24. How to design a tiny URL or URL shortener?
  25. K'th Smallest/Largest Element in Unsorted Array | Set 2 (Expected Linear Time)
  26. Largest Rectangular Area in a Histogram | Set 2
  27. Largest Sum Contiguous Subarray
  28. Length of longest palindrome list in a linked list using O(1) extra space
  29. Dynamic Programming | Set 29 (Longest Common Substring)
  30. Longest Even Length Substring such that Sum of First and Second Half is same
  31. Maximum size rectangle binary sub-matrix with all 1s
  32. Merge k sorted arrays | Set 1
  33. Merge two BSTs with limited extra space
  34. Minimum steps to reach a destination
  35. Multiply Large Numbers represented as Strings
  36. Placements | QA | Progressions
  37. Print all nodes that are at distance k from a leaf node
  38. Printing brackets in Matrix Chain Multiplication Problem
  39. Reverse a Linked List in groups of given size
  40. Sort an array according to the order defined by another array
  41. Topological Sorting
  42. Trapping Rain Water
  43. Validity of a given Tic-Tac-Toe board configuration
  44. Given an a
  45. Write a function to get the intersection point of two Linked Lists.
  46. Write an Efficient Method to Check if a Number is Multiple of 3

Hard Level

  1. Backtracking | Set 7 (Sudoku)
  2. Dynamic Programming | Set 37 (Boolean Parenthesization Problem)
  3. Find Recurring Sequence in a Fraction
  4. Two nodes of a BST are swapped, correct the BST
  5. Implement a Phone Directory
  6. Implement LRU Cache
  7. Manacher's Algorithm - Linear Time Longest Palindromic Substring - Part 1
  8. Median in a stream of integers (running integers)
  9. Travelling Salesman Problem | Set 1 (Naive and Dynamic Programming)

Company Wise Coding Practice    Topic Wise Coding Practice