Interview Question for Software Engineer / Developers






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

In my view question has incomplete information
if there are 0 princess.. the picking gurantees atleast 1 princesses as 2^2^0 = 1. does that mean lamp was on ?
if there is 1 princess.. she will atleast be going once to on/off the lamp.. out of 4 possible picks.

how princesses makes sure about the strategy being communicated to all other princesses..
can they see the lamp while its being turn on or off.. can they count that number..

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

Alright, the question is changed to the right question.

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

They only switch the light the first time they are picked. The number of times the light is switched is the number of princesses.

- Anonymous December 02, 2010 | 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