Amazon Interview Question for Software Engineer in Tests






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

Refer this:
http://discuss.joelonsoftware.com/default.asp?interview.11.454352.10

- Alice October 24, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

if I have understood the question rite..doesnt this just involve traversing the entire list of stmts and adding up the num of false stmts as indicated by evry ith stmt ?

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

Assume there are n statements
All statements can't be wrong else last statement will become true. This contradicts itself(because it says no statement is correct).
All statements are contradicting each other. Hence only 1 statement can be right. That means n-1 statements are wrong.
This is exactly what (n-1)th statement suggests. Hence all statements except (n-1)th statement are wrong.

I know its tough to understand but try simple example when n=5
1) 1 statement is false
2) 2 statements are false
3) 3 statements are false
4) 4 statements are false
5) 5 statements are false
Statement 5) cannot be true. Statement 1) cannot be true. We will find that only statement 4) can be correct

- Avinash November 10, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

best reasoning.. am sure they hired u!

- clrs March 25, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can some one explain why statements 1,2,3 are false ?
I understand the reasoning for statement 5 but I am unable to extend the logic for statements 1,2,3

- abhimanipal April 08, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

If the statements were worded "Exactly [i] statements are false" this solution is true. I assume that is a clarification that the interviewer would make. Otherwise the solution is n-1, not 1.
Good solution and reasoning.

- Sean December 08, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

because if 1 is true, that means 2,3,4 must all be true (since we have already known 5 to be false). But this can't be the case since for 2 to be true, there must be 2 false statements. Same with 3 and 4. So 1 is obviously wrong.

Using the same argument, repeat it for 2 and 3, and you will deduce both are also false.

Anyway, perfect answer Avinash :)
"All statements are contradicting each other. Hence only 1 statement can be right. That means n-1 statements are wrong.
This is exactly what (n-1)th statement suggests. Hence all statements except (n-1)th statement are wrong."

- yh April 24, 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