Microsoft Interview Question for Interns


Country: United States
Interview Type: In-Person




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

hmm, strongly depends one the db. ms implies access. if i had to choose i'd select mnesia but that's just my personal preferred option.

so, the question implies that you search a lot and insert/delete less. this leads to the next question: what is the content, what are the keys? with a focus on search i'd suggest sth bst like, or key hashes. then you could also distribute your database over several disks to gain speed... (i.e. spread buckets over disks to search for one key hash concurrently...).

- nils.muellner@googlemail.com February 12, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Several terabytes fits in nowadays HDD not in the RAM. We should split our database into few files: index files and data file. Typically index file of database is presented as B-tree for decreasing disk read/write operations. Search time is Log b (N), where b - number of child of one node in B-tree.

- zprogd February 19, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In such a situation, one should create some indexes on the data, for example B+ tree, where the index node size could be alpha times internal memory size where alpha is less then one, and is decided based upon performance.
so this means, we are actually have alpha times internal memory size of fan out of the tree, which reduces the height of the tree significantly, to Log(N/(Alpha*M))/Log(Alpha*M), where N is the total size of the Daata, and M is the internal memory size.
similarly Insert also, in most cases, untill we have to do some node partitioning which is very rare.and so delete(where we do lazy delete). Full scan any will take same amount of time, we have to read all the data, can't do anything.

- sonesh June 07, 2015 | 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