Snapdeal Interview Question for SDE1s


Country: India
Interview Type: Written Test




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

This sounds similar to the problem of having two eggs to find out from which floor they will break...Answer should be 17

- Coder... February 15, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

explain pls....it has 150 men and not 100

- Anonymous February 17, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

What is problem with binary search?.Can you explain your solution.?

- Mukesh May 03, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Assume height[i] = i;
blindManHeight =2;

How many yes does he need to find his place??

- Hiha September 03, 2015 | Flag
Comment hidden because of low score. Click to expand.
4
of 4 vote

Yes n(n+1)/2 >= 150. n is approx 17

- qakbot100 February 16, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

I think the answer is 24.

solve for integer k such that 150/k + k - 1 is minimum. k is 12 and min is 23.5 => 24

Divide 150 men into 12 groups of 12 people and the last group has 6 people. The worst case would be that he starts on the first group and then goes down all the way to the 12th group and the man said YES. Then he go to the start of the group and ask the rest of the 11 people. You can not do binary search because once there is a second YES, you are done done.

- Mando Dong August 07, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Binay search and keep a counter.

- Anonymous February 16, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Read the problem -- binary search will give you nlogn failures in worst case, not 2.

- Coding Owl February 21, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Is the blind man able to pick out midpoints?

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

i think it should be 25

17+8 because 18*8 = 144

so 8 + 17

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

Should not it be 12+11=23 what is wrong in this calculation?

- sudha March 16, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

25

- Asom March 23, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Let's say height of Blind man is 5.
people stand in
1, 1.5, 2, 2.5,3,3.5,4,4.5,6,6.5,7,7.5,8.0,8.5 = 14 total count
as he know total count, he will reach to middle (i.e. 4 and ask "Am I taller than you?" )
1st Yes,
(As NOs can be unlimited), he can iterate from 4.5 to 6.5, at 7 he gets asnwer last yes, gets placed. (so total iterations are less than n/2)

- Venkata ramana March 23, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Is this puzzle solvable if

1)All the men are taller than him?

2)All the men are shorter than him?

- Anirudh April 10, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Answer : 17
The blind man will ask questions to in order 17, 33,(17+16), 48(17+16+15),.....,150(17+16+15+....+5+4+3).

Now lets say 17th man answer yes then he will ask question to each guy from 1st to 16th and worst case can be 1+16=17.
or lets say 48th man answer yes then he will ask question to each guy from 34th to 47th and worst case can be 3 + 14 = 17

in same way u go further and find worst case 17.

- ramesh April 22, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

hi, why he will ask from 34th to 47th, why not from 18th to 47th, i am not clear, can you please answer to accesssantu@gmail.com, if you find some time. Thanks in advance...

- santhosh May 18, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

answer is 14.
(28x5)+9=149
worst case=149

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

150/5=30+1(First)+2(yes)=33

He start asking every fifth to make it faster but start with the first in the line.
1=yes if no 5=yes then he gonna ask 2,3,4 until he one of them answer him yes again, so he have 2 YES. |worst case possible he taller than all of them or the last person answer him yes|
{1;5;10;15;20;25;... ...;145;150}=31+2(yes)=33

- Anonymous May 11, 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