Microsoft Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Probably locality of reference.

- Anonymous May 24, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

is performance better for searching an element?

- Anonymous May 24, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Binary tree can allocate memory from anywhere in the heap...these locations need not be on the same page...in an array they are contiguos memory and hence once the page is swapped in it stays in primary memory and all access are fast...similar to link list vs array

- KAK July 24, 2007 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Less cache misses for array because of its better locality of reference.

- myday2008 April 01, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think frequent updation in binary tree will cause fragmentation, which is not the case with arrays

- algooz April 28, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

can u explain this..I think the memory once .. nd if we update.. we will be updating the values .. or pointers in a binary tree..
also even if we are balancing the tree then also we will only update the pointers correspondingly .. correct me if I am wrong

- Sukhmeet2390 August 25, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

First of all, I am not sure if his assertion is correct.
Event if it is correct, I doubt it has to do with computer architecture. It might has to do with the size of memory. It might take longer to address the memory in a 4Gb memory than a 4kb memory.
I might be wrong.

- XYZ September 18, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

@XYZ: "I might be wrong......" yeh baby you're completely wrong !

- algooz October 02, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

its prefetching in case of array.

- Anonymous June 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

200-elements array can be kept in L1 cache (which is effectively the fastest computer memory) entirely, while 200-elements tree with high probability can not be kept there (a tree is fragmented beacuse of memory block for each node is usually allocated separetely from the heap).

- Aleksey.M November 28, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More