Microsoft Interview Report
- 2of 2 votes
AnswersFind the Max sum subsequence in array
- JSDUDE May 04, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE1 Arrays - 1of 1 vote
AnswersGiven a rotated sorted array, find the MIN of the array.
- JSDUDE May 04, 2013 in United States
He pointed out a mistake in my
int middle = (begin+end)/2 which could overflow if the array size was INT_MAX.
Answer was:
middle = (end-begin)/2 + begin| Report Duplicate | Flag | PURGE
Microsoft SDE1 Arrays - 0of 0 votes
AnswersSingle Initialization :
- JSDUDE May 04, 2013 in United States
Global variable x, initialized to 0.
Implement a function that can be called by multiple threads simultaneously or sequentially.
The value of x should be set to the current time only once. If it is already set, the value shouldn't be updated.
Make sure that the function doesn't become a bottleneck| Report Duplicate | Flag | PURGE
Microsoft SDE1 Threads - 0of 0 votes
AnswersQ1. What is inheritance
- JSDUDE May 04, 2013 in United States
2. Polymorphism
3. Diff between Pure Virtual class and Virtual Class
4. Adv and dis-adv of C# and C++ over each other
5. Sequence in which constructors are called when a child class object is created and why is the order so.| Report Duplicate | Flag | PURGE
Microsoft SDE1 Object Oriented Design - 0of 0 votes
AnswersGiven a BT and 2 nodes, find LowestCommonAncestor
- JSDUDE May 04, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE1 Trees and Graphs - 0of 0 votes
AnswersGiven a Binary tree and a node, return it's post-order predecessor
- JSDUDE May 04, 2013 in United States| Report Duplicate | Flag | PURGE
Microsoft SDE1 Trees and Graphs - 2of 2 votes
AnswersGiven a binary tree, print its perimeter:
- JSDUDE May 04, 2013 in United States
node, left->most nodes from top to bottom, leaf nodes from left-> right, right->most nodes from bottom to top
----------------------------1
-----------------------2--------3
------------------4-----5-----6--------7
-------------8------9-----10------11-----12
should print:
1-2-4-8-9-5-10-11-12-7-3
5 because it doesn't have any children. 10 and 11 are children of 6 and 8 & 9 are children of 4.
Apologies for the messy diagram.| Report Duplicate | Flag | PURGE
Microsoft SDE1 Trees and Graphs