Microsoft conducted their first round of shortlisting for placements and internship. The online coding round was organized by CoCubes like last year.
The test was for 1.5 hrs and had 2 coding questions. Allowed programming languages were C, C++ and Java.
The questions were as follows:
1) Given the head of two linked lists , find the merging point of both the linked lists. In case the linked lists do not merge then return NULL.
2) Given a 2d array of 0s and 1s where 0s represent water and 1s represent land. A connected patch of 0s count as one single water body and if a water body is covered by 1s all around it then it forms one pool. Write a function to return the total number of pools in the 2D matrix. In case a water body is present on the boundary of the array immediately return -1.
Sample test cases :-
Input : 11111 10101 10111 11111 11111 Output : 2 Input : 11110 11111 11011 11011 Output : -1 Input : 11111 10111 10011 11011 11111 Output : 1
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. 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 Experience (Full Time 2018 Washington DC - with 2.5 years of experience)
- Microsoft Interview Experience | Set 151 (SDE-2 3.5 years experience)
- Microsoft Interview Experience | Set 169 (SDE 2 for 3.5 years experience)
- Microsoft Interview Experience
- Microsoft Interview Experience (SDE II)
- Microsoft IDC Interview Experience | Set 88 (For SDE-1)
- Microsoft Interview Experience | Set 54 (For SDE)
- Microsoft Interview Experience | SDE-II
- Microsoft Interview Experience | Set 89 (For SDE-2)
- Microsoft Interview Experience | Set 53
- Microsoft IDC Interview Experience | Set 88 (For SDE-2)
- Microsoft interview Experience | Set 50
- Microsoft Interview experience | Set 106
- Microsoft Interview Experience | Set 45