Microsoft Interview Report
- 0of 0 votes
AnswersGiven a pattern P and a text T, WAP to return all indices from T where P matches.
- pavi.8081 April 10, 2013 in India for STB and MVO| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Algorithm - 0of 0 votes
Answersarray of numbers are given. WAP to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.
- pavi.8081 April 10, 2013 in India for STB and MVO
Follow up: After writing program to return the largest sum modify it to return the start and end index of such a subarray.| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Algorithm - 0of 0 votes
AnswersGiven an array with source code and braces (braces means '{' or '}' ) intermixed. WAP to return true of braces are balanced (implies that for each opening brace there must be a closing brace and for each closing brace there must be opening brace) and false otherwise.
- pavi.8081 April 10, 2013 in India for STB and MVO| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Algorithm - 1of 3 votes
AnswersPosition of Knight is given on a chessboard.
- pavi.8081 April 10, 2013 in United States for STB and MVO
Return me something (adjacency matrix or list or anything) which shows all
the positions the knight can reach upto from a given position.
I must be able to tell, from what is returned, if the position is reachable or not
and if reachable I must be able to trace the path from given position to target position
<<FOLLOW-UP>>
For example if 4 cells are reachable from a cell A, then these 4 cells become children of A.
Then from a cell, say B, out of these 4 cells, you can reach 2 more cells: C and D. Then C and D become children of B.
Likewise program need to return me a DS. I have given a valuable hint with this follow-up. I hope this will help| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Algorithm