Amazon EFI Interview Question for Software Engineer / Developers






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

|5.5m - 30h|
If greater than 180, subtract from 360.
This accounts for the change in hour hand for every minute (There is 0.5 degree change in the hour hand for each minute).

- XeqtR February 02, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
2
of 2 vote

Hour hand of a normal 12-hour clock turns 360° = 0.5° per minute = 30° per hour
Minute hand rotates through 360° in 60 minutes = 6° per minute.

SO, hour hand rotates = 4*30° + 40*0.5° = 140°.
and minute hand rotates = 40*6° = 240°

So the angle between them = 240-140 = 100°

- nsdas August 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

theta = 30Y - 6X.

where 30 and 6 are the angles covered in 1 hr and 1 min respectively.
thus if time is 1hr 1 min. Then Y = 1, X = 1
so theta = 30-6 = 25deg

If X is 1 min then Y = 30/60 = 0.5
so theta = 30*0.5 - 6 as state above.

- cirus February 04, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

// hour's hand angle
(hr%12)*360/12 + (min%60)*30/60 (The 2nd part is the movement added by the min hand to the hr hand)

//min's hand angle
(min%60)*360/60

difference between (1) & (2) is the answer.

- Saurabh Shah February 20, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Assume time to be ( 'a' hours:'b' minutes: 'c' seconds)

a= a%12;
theta1 = (a + b/60 +c/3600)*2*pi/12 ;
theta2 = (b + c/60)*2*pi/60 ;
dthetaRadian = abs(theta1 - theta2);
dthetaDegree = dthetaRadian*180/pi;

- Anonymous February 14, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

en.wikipedia.org/wiki/Clock_angle_problem

- Anonymous March 10, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

let time is X:Y(like 7:15) then angle=60X(1/2)+(1/2)Y-6Y=(30X-(11/2)*Y)%360

- jaggu September 15, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Answer: 100 degrees. Is it correct?

- Om August 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The angle between them (in degrees) for h hours and m minutes is

(h*60 + m)*5.5 modulo 360. (where x mod 360 for an arbitrary real is defined as (x - ([x] mod 360), [x] is integer part of x)

We arrive at this by thinking in terms of relative angular velocities.

Maybe overkill.

- Anonymous August 25, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Math.abs(6.0 * min - (min / 2.0 + (hour * 30)));

- zoxi September 02, 2011 | 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