Oops!! It seems some javascript files did not load. Please hard reload(SHIFT + reload) your page.

“ InterviewBit helps set the right expectation about the kind of problems to expect in an interview. Apart from that, it helped boost up my confidence for interviews. Thank you very much Interviewbit team. Hope you reach out to many more people. ”

Rahul Nagurtha
“ InterviewBit is one of the best designed online judges out there. It helped me find and solve good questions from all the areas of data structures and algorithms. In a few days, I got addicted and wanted to visit the site every single day.
The questions on the site have been previously asked in... ”
see more

Priyank Bhadja
“ Interview Bit helped me in a lot of ways.
Short Version :
If you want to get a coding job, don't wait, just start preparing from InterviewBit. It is one of the best resources out there for Data Structures and Algorithms, and I guess they'll develop courses for other subjects as well.
Long... ”
see more

Yash Jain
“ I had a terrible time last year trying to get an internship. I could not get internship-offer from any of the top-notch companies like Microsoft, Amazon etc. At last, I got internship offer from SanDisk India Device Center in March-2015. Then, I heard about the site InterviewBit during the... ”
see more

Vinay Sharma
“ I had recently acquired an internship with Microsoft and i would like to thank interviewbit's team for it. It really helped me alot in the preparation. ”

sanjana jain
What to expect at Microsoft Interview?

Be able to discuss the big-O complexity of your approaches. Don't forget to brush up on your data structures like lists, arrays, hash tables, hash maps,
stacks, queues, graphs, trees, heaps. Also sorts, searches, and traversals(BFS, DFS). Also review recursion and iterative approaches.

Use the programming language you're best at. It's important to write your solution correctly and in time, so use the language you are most familiar with.

Find and fix the bugs by yourself: Don't wait for the interviewer to find them for you.

Use the hints you are given: Usually, the interviewer knows the question well enough to know which hints will help you next if you get stuck.

Find and fix the bugs by yourself: Don't wait for the interviewer to find them for you.

Use the hints you are given: Usually, the interviewer knows the question well enough to know which hints will help you next if you get stuck.

Solve Interview Problems asked at Microsoft

Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than floor(n/2) times.
You may assume that ...

Distribute Candy

There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following...

Longest Increasing Subsequence

Find the longest increasing subsequence of a given sequence / array.
In other words, find a subsequence of array in which the subsequence’s elements a...

Max Rectangle in Binary Matrix

Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area.
Bonus if you can solve it in O(n...

Max Product Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest product.
Return an integer corresponding to the max...

Regular Expression Match

Implement wildcard pattern matching with support for '?' and '*'.
'?' : Matches any single character.
'*' : Matches any sequence of characters ...

Edit Distance

Given two words A and B, find the minimum number of steps required to convert A to B. (each operation is counted as 1 step.)
You have the following 3 ...

Regular Expression II

Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding elemen...

Swap List Nodes in pairs

Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1-...

Remove Duplicates from Sorted List II

Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1-&...