Amazon Interview Question for Software Engineer / Developers


Country: United States




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

Weighted DiGraph, with A,Starbucks,B as vertices (probably has other nodes as well) and time as weight.

Probablity
All paths from A to S and S to B with adding the time not exceeding N mins/would be number of paths from A-B

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

Probablity
All paths from A to S and S to B with Nmins(BFS till time reaches N mins) / total number of paths from A-B

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

All paths from A to S and S to B with Nmins(BFS till time reaches N mins) / total number of paths from A-B (till time reaches N mins)

- jayk January 16, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

For simplicity let assume that there are K ways from A to B that you can reach in N or less minutes. From interviewer you need to clarify also constrains like loops in paths, etc.
In Q ways from K there are Starbuckses. As a result probability will be

P= Q/M.

As reference of finding K ways please see wikipedia URL:
en.wikipedia.org/wiki/K_shortest_path_routing

- Aram.Khzarjyan January 09, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

what is M..?
I think it should be K/Q

- raju. January 10, 2015 | Flag


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