Interview Question for Software Engineer / Developers






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

Binary Search.

- Guest123 August 29, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

@ guest123

can u elaborate ur answer , at least give ur approach when answering a question

- getjar.com/todotasklist my android app August 30, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@ guest123

can u elaborate ur answer , at least give ur approach when answering a question

- getjar.com/todotasklist my android app August 30, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Binary search is perfectly clear.

Start with 1, then 2, then 4, then 8 and so on, till you see a 1.

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

Start with 1, then 2, then 4, then 8 and so on, till you see a 1. But this 1 is not necessary first 1. So you can use binary search on the zone between last 2^n-2^(n+1)

- Anonymous August 30, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

This is duplicate question, was seen sooooooo many times in amazon/MS question. What's wrong with this guy?

People should refrain from replying to posts that look like spamming or HOMEWORK!

- anonymous September 02, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

sorry buddy i lost my cool and spoke like an idiot.my apologies... ;(

- anonymous September 14, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

I think instead of binary search we can do the following. Because we don't even know how much big is the array so how far would you travel to get a 1.

FindFirstOne(int arr[], int low, int max)
{
int h = abs(rand()) % max ;
if(arr[h] == 1)
FindFirstOne(arr, low, h);
else
FindFirstOne(arr, low + h, max);
}

- Anonymous September 28, 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