
Microsoft Interview Questions and Answers
Are you a developer? Need to update your software development knowledge or need to prepare for a job interview?
Check out this collection of Microsoft Interview Questions and Answers...
Microsoft Interview Questions and Answers
 How could you determine if a linked list contains a cycle in it, and, at what node the cycle starts?
 How would you reverse a doublylinked list?
 Assume you have an array that contains a number of strings ....
 Given the following prototype ....
 You are given a scale which you are to use to measure eight balls
 How do you find the 3rd largest word in a given string that is millions of characters long and he wanted me to give a solution in only one pass ?
 Microsoft Interview Question about Algorithm
 Microsoft Interview Question about Multithreading
 Microsoft Interview Question for SDE in tests
 Write a method to combine two two sorted linked list into one in sorted form with out using temporary Node.
 Write a function that takes three integers corresponding to the lengths of sides ....
 Four people need to cross a rickety rope bridge to get back to their camp at night.....
 Implement the following function, FindSortedArrayRotation.....
 A solution consists of four balls from a set of four different colors......
 How could you determine if a linked list contains a cycle in it, and, at what node the cycle starts?
 How would you reverse a doublylinked list?
 Assume you have an array that contains a number of strings ...
 Given the following prototype:int compact(int * p, int size) ...
 Suppose you are passing a string to a Formatter function ...
 Given a string S of words and no of character per line m ...
 Write a program which gives a numerator and a denominator...
 how to correctly instantiate this class: ......
 Microsoft Interview Question for Software Engineers about C ......
 Given a singly linked list with a loop ......
 find out missing no. from a stack if two given stacks have same numbers .
 Given an array of integers...like 10 12 16 17 24 27 8 6 5 4 2.....
 given a 32bit integer x.....
 Find the number of ways of placing 3 balls in 3 buckets......
 given a polynomial f(x) of degree n, i.e......
 a linked list contains 2 19 _ _ 3 47 _ _ _ 2 20 _ _......
 There is a large document. which contains millions of words.
 You are given a string sequence and program need to output the number......
 Given an array arr[] of n integers, construct a Product Array......
 given a expresion 2*3+53......
 given a string write all the possible upper case and lower case strings......
 two 32bit integers m,n are given.replace all the bits......
 develop a solution for an elevator system in a building having 50 floors.....
 replace all the spaces in a string with %20.
 Where does constant strings resides in memory in cprograms...
 Given a stream of text eg you can read 1 char at a time.....
 Input is a matrix of size n x m of 0s and 1s......
 Implement a function that performs binary addition .....
 exact code for postorder traversal of tree without use of recursion 
 Find inorder successor and predecessor of a given node in BST ......
 Write a function that takes an input string and a pattern string ......
 Convert the BST to sorted doubly linked list , don't use additional data struct.
 Print the M*N matrix in spiral manner.
 Write a C code to find Leftmost right cousin at the same leve .....
 Reverse link list using recursion.
 Write an algorithm to find the first nonrepeated character ......
 Write code to serialize and deserialize a tree.The nodes contain string......
 , Implement a lexical analyzer Input string .....
 SCVMM  Or Server tools  whatever found that the person .......
 You are given a document having lot of words in it and .....
 you are given a linked list and you are supposed to take it as input and return
 Find the output of the following code ...
 fill all the numbers from 1 to 8 in the diagram shown below ...
 find the bug in the following code which concatenates...
 Write down the output....
 If you are given 2 number U and V then Write a program....
 Given an array of integers and a unique number. find all different combination of numbers
 Given an array of integers and a unique number....
 search a number in a sorted array of the form....
 Given a very big file of words, a word in each line, sort the words....
 Given a binary tree where initially sibling pointers....
 Given a Roman number, convert it into the decimal number....
 Given an array of natural numbers....
 Gven an integer n, write code to calculate n+1
 Given 2 linked lists, merge them inplac....
 Given n arrays, find n number such that sum of their differences is minimum....
 Write a function to print a multiplication table.....
 Given number 1,2,3,4,5,6,7,8,9 find all sets that sums up to 10.....
 Given a rectangle with known width and height, design an algorithms to fill ....
 Given a BST and integer value K.....
 Given a character array with a set of characters.....
 Print an mxn matrix spirally. Write code for the same.
 Given a continuous stream of 1's and 0's how do you determine .....
 Given a string eg "aaabbccaaadd" replace the same string as "3a2b2c2a2d" .....
 Given a sorted array, find a pair of elements that sum upto a given value.
 Difference between Dictionary and a Hashtable ?
 Whats a Linked List ? Given Two linked list forming a Y shaped linked list ...
 Spiral Matrix psuedo code(& logic)
 You have to find the direction of rotating magnetic plate ....
 You have multiple mail servers in different places around the world ....
 OOD (classes,functions, type of class etc) for a Burger Shop such as Mcdonalds etc?
 How would you test a Stack? ....
 Given a set of words in a dictionary, write a program to group ....
 Implement the function ....
 Implement the function int pow (int a, int b) ....
 Merge two arrays and sort them in order as specified at runtime ....
 How can we sort one unsorted int array with O(n) ....
 Write test cases for delete numbers found in list2 ....
 Write test cases for int divide(int a, int b) ....
 Given 2 sorted integer arrays, find the intersecting element in them.
 Given 2 sorted linked lists  merge them .....
 What data structure would you use to implement spell correction in a document .....
 Given a matrix of 1s and 0s. ....
 Suppose you are given a cube and each face of the cube contains an array. ....
 There is an array of size 50 that is expected to contain all the numbers. ....
 Write test cases for backspace functionality for MS WORD
 Anyone is having algorithm for Multibyte backspace? ......
 If I have a string like ......
 An array is of size N with integers between 0 ......
 ALongest substring repeated multiple number of times.
 Roman numerals to decimal
 Design an alarm clock for a blind person
 Assume that you have 2^32 bytes of memory .....
 Pretend you work for a phone company. At your company .......
 Write a function to validate a BST .......
 Give atleast 10 test cases for a program which finds.......
 What is the data structure which suits best for the Battleship game?.......
 In a unsorted binary tree, preorder, postorder.......
 How to remove duplicate data from an array efficiently?.......
 Need to design a class for the following requirement.......
 We have two sorted array.......
 We have two unique sorted arrays........
 Merge two unsorted array and remove the duplicate from........
 You are given a pointer to a node of a min heap........
 Design a algorithm for printing a book........
 Implement the tokenize function in C and how do you handle multiple spaces between words ?........
 Given a finite number, find out all the possible strings........
 Given the current time as input........
 Given two sorted arrays of integers........
 Given a singly link list........
 Implement strcat in C.........
 Preparing sets from a given array with min complexity.........
 Implement Queue using Stack. Help to get a code with resolving complexity.
 Write a program to reverse pointers of a binary tree?.......
 Given a cycle of n nodes. Each node has a money Bi .......
 You are given n petrol stations s(0), s(1), s(2).......
 Implement enqueue and dequeue operations using stack(s).
 What subtleties you will look for while writing an atoi program? ......
 How will you detect if two rectangles intersect ......
 Print a 2D array spirally.
 Write test cases for copy command in UNIX.
 Given a sorted array and a number ......
 Given a BST, print all nodes lying between two values ......
 Given a tree where each node points to its parent ......
 140. Reverse a linked list using recursion
 141. The scenario was something like that
 142. Code malloc() in C
 143. You are given a 1D array of integers ......
 144. If [a1,a2,a3...,an,b1,b2...bn] is given input change......
 145. Path to deepest 1 in a binary tree.......
 146. Given a binary tree, and 3 values A,B and C. write an .......
 147. First remove all repeated consecutive substring with .......
 148. Given a binary matrix of N X N of integers.......
 149. paragraph is given find out the second largest word in given space and time.
 150. Given a tree, find out if the tree has a given sum or not.
 151. Print all possible palindromes(of length >2) for a given string.
 152. Given two strings, return the last index of a given substring in a string
 153. There is a row of houses in which each house contains some amount of money ......
 154. Write a function that rotates and MxN matrix......
 155. Print the nodes of a binary tree by level (breadth first)
 156. Write the memmove function in C. ......
 157. How to find whether two linklists intersect each other or not? ......
 158. Given 2 strings S1 and S2, Check the first charaster that is repeated in S2.
 159. Given array of n integers and given a number X .......
 160. Given a stream of N integers which has the property that no integer .......
 161. How to serialize and deserialize a nary tree?
 162. How do you check if two pixels are overlapping or not.. ?
 163. How do you find the longest palindrome in a given string ?
 164. rearrange an array of integers such that on one side .......
 165. Find max and min in an array with the least number of comparisons
 166. How do you remove duplicates from a list.....
 168. How do you know if a tree is a bst or not ?
 169. design a data structure for a DNS server
 170. Write down String class copy constructor ?
 171. find a bug in following code .......
 172. Write a function which determines whether provided string matches specified pattern .......
 173. A program has two functions 'reader_func' and 'writer_func' .......
 174. Given an array arr of size M containing distinct integers .......
 175. When would a teleportation device not increase the speed of your commute?
 176. Given a sorted array with duplicates and a number.......
 177. Find next palindrome of a number.......
 178. Given a very large array of n integers.......
 179. Write a function to get lowest common ancestor in "binary tree"
 180. write a insert function to insert into binary search tree node *insert(node *root);
 181. Write a function that output the size of highest .......
 182. Write a code to print level order traversal of Nary tree .......
 183. print all the numbers that will sum up to n .......
 184. Implement run length encoding and decoding........
 185. test atof(char *s)
 186. How do you test a function which would return the second smallest number in a BST?
 187. Given array of integers and a int variable say X. ......
 188. Implement Stack using Queues?
 189. You are developing a component that requries parsing a lot of XML tags ......
 190. A mail server exposes an interface as mentioned below ......
 191. Write code for Ceaser Cipher Algorithm to encrypt/decrypt messages.
 192. Write an Algorithm for Finding Siblings in a Binary Search Tree.
 193. How to find duplicate words in a string and their frequency
 194. Implement a circular queue using an array. Implement enque and deque.
 195. How will you delete duplicate odd numbers from a linked list?
 197. Design an algorithm to find all the anagrams in a dictionary and code it. Write the test cases also
 198. Given eight 8s: 8 8 8 8 8 8 8 8 .......
 199. Given 5/2=3, what will be the output of 10/3?
 200. Write code for finding square root of a given no.
 201. Implement two stacks in a single array. .......
 202. Given an array (can have negative numbers). .......
 203. Given an integer array. Find the five most frequent numbers.
 204. Given two strings s1 and s2 ......
 205. Reverse words in a string
 206. Given an array and a sum value return any two integers ......
 207. Write a code to find if two linked list intersect.
 208. Given an array like ......
 209. insertion sort of linked list
 210. How do you find whether two strings are anagrams
 211. Write an algorithm which will return position of first character of string
 212.Print nodes at k distance from a given node like
 214. Write a function which finds a substring in a string
 215. Given an array containing lower case and upper case alphabets
 216. Given 5/2=3, what will be the output of 10/3?
 217. Suppose you are given a function void NumberofSum(int n) , write a code such that will print all the numbers that will sum up to n
 218. How do you find whether two strings are anagrams?
 219. recursive function for strlengh
 220. Given a set of positive and negative integers group all the positive integers on ..
 221. Given a string of characters reverse the string ... ..
 222. What data structure you use for a dictionary  search and insert logic
 223. Find median of two sorted arrays.
 224. find out how many unique paths to the top right hand corner cell
 225. suppose you are given 2 points on the board(x1, y1), (x2, y2) ......
 226. In a nxn board, some nodes are black colored. Given a black node ......
 227. Define a macro for logical XOR operation
 228. Given 2 points a chess board .....
 229. What is the output of the program... .....
 230. You have to determine whether a polygon contains a point... .....
 230. There is a linked list of numbers of length N. N is ... .....
 231. Given a file in which the data is stored in the form ... .....
 232. Given a string you have to remove all the duplicate elements from the string ... .....
 233. Print all edge nodes of a complete binary tree anticlockwise ... .....
 234. There is a document containing lots of information ... .....
 235. There is an array A[N][M] =... .....
 236. There are two linked list that are sorted... .....
 237. Find the output of the program?... .....
 238. You have single linkedlist.Swap every consecutive ... .....
 239. create your own atoi()?
 240.There is a byte array which contains the character of one
 241. Implement Stack with Push() Pop() and Mininum() operation in O(1).
 242. How will you delete duplicate odd numbers from a linked list? ....
 243. You are in a maze, and you open your eyes so you ....
 244. Given a 4x4 board with pieces in it ....
 245. Given a MxN matrix, in how many ways can you go from topleft to bottomright?
 246. An array is given like {1,4,5,2,3,6,7}
 247.Given a input string find the longest substring which appears more than once in the string?
 248.Given two sorted positive integer arrays A(n) and B(n)
 249.Given two sorted positive integer arrays A(n) and B(n)Given a pointer to the node, the node has one data part and two address pointers ......
 250.Given a singly linked list sorted in ascending order, convert it to a height balanced BST from this.
 251.Given a text file, implement a solution to find out if a pattern similar ....
 252.Design the data structure to provide the mathematical operations .....
 253.What is the output? What is the problem with the code if any?.....
 254.Suppose you a have function which returns a word char* GetWord() from a document.....
 255.Merge two linked lists: Node* MergeList.....
 256.Excel labels its rows with letters.....
 257. Given a text file and a function getNextWord().....
 258. Implement the function bool isRegex(char *reg.....
 259. There are two linked lists A and B. Find if they both intersect.....
 260. What is bug in this code? correct it......
 261. Remove intersections of two single linked list and make one linked list.....
 262. Merge two sorted singly linked lists into one without using extra.....
 263. Given a binary tree print the nodes in this order.....
 264. Sort an array of 0,1 and 2
 265. Difference between AVL trees and Red black trees
 266. Find the intersection of two linked lists. Optimum space and time
 267. Given a directory path find the most optimum traversal.
 268. Given two sorted linked list......
 269. Given a linked list of numbers. Swap every 2 adjacent links.......
 270. You have been given a linked list of numbers.......
 271. Design a compact data structure representation of a graph
 Given a matrix of integers sorted along each row and each column, implement a rapid search algorithm
 Reverse a linked list with O(1) memory, and O(n) time
 Delete a node from singly linked list given head pointer and pointer of the node .....
 Finding number of on bits (1 bits) given an integer..discuss the various approaches..what is the best one?
 Vertically inverting an image (given an input array of pixels and an output array to write to)
 Algo to check if given binary tree is binary search tree or not .....
 Reverse linklist in block .....
 A box contains Red and Green balls... .....
 Network ip add is given in str form... .....
 There is long list of natural numbers.... .....
 Question: You need to spend an exact amount from given types of coins of various denominat.... .....
 Microsoft Interview Question about Bit Manipulation
 Microsoft Interview Question about C++
 Microsoft Interview Question for Software Engineers about Coding, Data Structures, Algorithms Data Structures Trees and Graphs
 Microsoft Interview Question for Software Engineers about Algorithm Arrays Coding
 Microsoft Interview Question for Software Engineers about Coding, Data Structures, Algorithms Linked List
 Microsoft Interview Question for Software Engineer / Developers
 Microsoft Interview questions in HR or recruiter Round
 Difference between STE and SDET roles at Microsoft
 Microsoft software development engineer in test (SDET) interview questions
 Microsoft Interview Tips
 Microsoft Intelligencebased interview
 Questions for Testers at Microsoft
 Microsoft Interview Questions only
 Microsoft Interview Questions 2
 Microsoft Interview Questions 3
 Microsoft Interview Questions 4
