It was online test which contains 20 MCQs on C & C++.
The coding round had two questions.
- Given some text lines in one string, each line is separated by ‘\n’ character. Print the last ten lines. If number of lines is less than 10 then print all lines.
- Do the level order traversal of complete binary tree.
1 2 3 4 5 6 7
Print it as
4 5 6 7
Technical Round 1
- First he asked me to tell him about any project which I have worked on.
- Given an array of integers. Find consecutive elements in array which has maximum sum. I know the solution to this problem so I told him quickly.
- Next he modified the question and asked me to find consecutive elements in array that have sum equals to zero. Taking some time, I told the answer to this question also.
- Next he modified question again and asked me to find consecutive elements in array that have sum close to zero, given that there is no sub array with sum equals to zero. Also write test cases for it.
Technical Round 2
- Given a linked list. How will I detect whether the list has cycle? Also write test cases for it.
- He then asked me whether I have some knowledge of graphics programming. He asked me how I will implement ‘floodfill’ for graphics application. Write code and test cases for it.
Technical Round 3
- Given a 2D array and a key value. Search this key value in array and turn all elements in row and column of this key to zero.
- Given a sorted array of size n. Each element in array is unique and lies from 1 to n+1. Find the missing element. Write code and test cases for the same.
- How will I keep track of number of visitors visited my web page?
Technical/HR Round 4
- Given a string. Find a character with most number of occurrences. Write code and test case for same.
- Why I want to join Microsoft?
- What’s the most challenging task I did in my graduation life?
HIRED 😀 😀
I would like to thanks geeksforgeeks team for this wonderful site which helped me a lot and without which I would not be able to crack this interview.
This article is compiled by Akash Gupta. Many Many congratulations to Akash Gupta. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
- Microsoft Interview experience for full time position of software engineer at Microsoft Ireland Research
- Microsoft Interview Interview Experience for Full Time
- Microsoft Interview | 12
- Microsoft Interview | 13
- Microsoft Interview | 16
- Microsoft Interview | 17
- Microsoft Interview for SDE-2
- Microsoft Interview | Set 24
- Microsoft Interview | Set 23
- Microsoft Interview | Set 22
- Microsoft Interview | Set 26
- Microsoft Interview | 18
- Microsoft Interview | Set 19
- Microsoft Interview | 15
- Microsoft Interview | Set 37 (For SDE-1)