Morgan Stanley Interview Question for Senior Software Development Engineers


Country: India
Interview Type: In-Person




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

one can use Scanner API from java.util package which doesn't keep references to line read from the file, as such the memory footprint of reading huge files through this API is very less as compared to conventional file reading API's as bufferedReader, etc

- Amit Gupta June 19, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

One can use API's like Scanner from the java.util package. This API doesn't keeps references to data one is has been read from the file and as such its memory footprint compared to conventional file reading API's like BufferedReader is very less. Good for reading huge files as such.

- Amit Gupta June 19, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

External Sorting
Let's assume 512GB is the maximum available for sorting at any moment.
1. Read 512GB from 5TB of input.
2. Sort it.
3. Save it to a 512GB block in hard disk.
4. Repeat steps 1 -> 4, 9 times until all 5TB is sorted, so we have 10 blocks of sorted data.
5. Perform Poly-phase mergesort, upon these 10 blocks, such that at any time max kept in RAM is 512 GB.

- Ajith August 12, 2019 | 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