Rapleaf Interview Question for Software Engineer / Developers






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

I don't understand why merge sort and bubble sort is mentioned here, max can be found in O(n) time anyway.

- Messi April 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

i think the question was meant to test how good u understand sorting algos . I would have said i will go for bubble sort with only one pass . As we know in every pass a element is placed at it right position here max element would go to last in one pass.
As with merge sort we would have to first divide the list which would any how will take O(lg(n)) and then we look for max .

- sachin323 April 17, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

definatly we will use bubble sort...becuse it will take just O(n) complexity

- sudhir April 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

agree with bala, while do we need sort to do max?

- newlifeseattle April 13, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

It is silly to use any kind of sort to find the max as people say. You want to process the whole data and just update the max, same for min, average, std deviation. Even median can be found in O(N) google for it

- Chuck Jerian April 01, 2011 | 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