Goldman Sachs Interview Question for Developer Program Engineers


Country: India
Interview Type: In-Person




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

for measuring:
-  an hour 
	- just burn a stick. it will be totally burnt in 1 hour.
- half an hour
	- burn a stick from both side, in half an hour it will be completely burnt.
- for 45 mins
	- burn a stick from both side(stick1). and other stick(stick2) only one side. once stick1 is completely burnt, stop second stick to burn and start burning that stick from both side. it will again take another 15 mins. so total you can complete it in 45 mins.

- sjain March 05, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Right sajan .... I too thaught in same way .. :)

- Anonymous July 05, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hi,

I am not sure if I am getting this wrong.

But, the objectivity to measure 1 hour 30 mins and 45 minutes seems absurd, while you have limited resources that last for 2 hours only (2 sticks, one hour each).

So if you have one stick extinguished, you will only have another stick which no matter what, will burn for not more than 1 hour.

- Kris March 07, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

you read the question wrong . the first case is for measuring : 1 hour 30 minutes
and the second case is for : 45 minutes.

- ashfaque.manipal March 08, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

for 1 n half hour - burn the first stick and by the time it burnt completely then start burning the second stick from both the ends - total time is 1 n half an hour - for first stick 1 hour and second stick half an hour.

- Asif March 14, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Its simple, for measuring
1/2 hour: burn two sides of 1 stick and 1 side of other stick. when two side burn stick finishes it is half an hour .
1/4 hour: by that time 2 side stick burns other stick will be half burn and light the other side so that it will finishes in 1/4 of hour

- Madhu March 26, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For a. 1/2 hour: Burn both sides of a stick (say Stick1), so it would be done burning in 30 min

Now, if you needed to have 1 and 1/2 hours, then simply start burning the next stick (say Stick2), after the first stick (Stick1) is done/burnt.

However, if you needed 45 mins, then start burning second stick (say Stick2) only from one side, at the same time as the first stick (say Stick1) was being started to burn from both side.
- So as soon as the first stick (say Stick1) is burnt from both side ie. 30 mins, the second stick (say Stick2) would have burnt from one side ie. half burnt already, simply start fire on the other/remaining side of second stick (say Stick2), so it would take another 15 mins to burn while being burnt from both sides. in all 1st stick takes 30 mins, and then second stick another 15 mins so we get 45 mins :)

- DS January 28, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

i believe there is one more solution to 45 min question:

1. Burn the first stick from both ends it will burn in 30 mins.
2. Once the first stick burns, lit the second stick from both ends as well as from middle, it will burn in 15 min

- Sunny Kumar June 29, 2016 | 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