Amazon Interview Question for SDE1s


Team: AppStore
Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
2
of 4 vote

This question is absurd, I doubt if it is coming from Amazon.

- Anonymous September 30, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 votes

You, either did not understand even a bit of the question in the first place or unable to explain it properly.

- Anonymous October 03, 2013 | Flag
Comment hidden because of low score. Click to expand.
2
of 6 vote

Can someone explain the question to me ? What blocks is he/she talking about?

- S O U N D W A V E September 30, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I may be a wrong but is not the L shape hint for knight movement in a chess.
So basically it boils down to filling the knight path with 1's and making sure that you dont fill the given i,j.

- aka[1] September 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

LOL

- Anonymous September 27, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

No its not knight movement because knight goes 2 step forward then 1 step left or right.

Here its one step forward and then 1 step left or right.

- Nitin Gupta September 28, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@nithin: but why think of starting point as the mid point.We can start from any point.We can start from anywhere as we just need to fill the matrix with L shaped shapes.I may be wrong in understanding the question.

- aka[1] September 29, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

@anish[1] - Yes you can start from anywhere. When did I said that you have to start from middle ?

You have to fill whole matrix with L shaped blocks such that only that cell remains unfilled whose co-ordinate is given.

- Nitin Gupta October 01, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

For NxN, where N is a power of two. This is a classic divide and conquer.

For others I suppose he was expecting some backtracking algorithm.

- Anonymous September 27, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

I gave divide and conquer solution. But I don't think divide and conquer is correct.
For Ex. In the last recursive call we will have 2 X 2 matrix where we can fill only 3 block, which is not correct as we have to fill all blocks except i,j

There must be some DP solution.

- Nitin Gupta September 28, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

possible = (N x M -1) % 3 == 0

- nara1 September 30, 2013 | 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