NVIDIA Interview Question for Software Engineer / Developers






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

The hour hand of a normal 12-hour analogue clock turns 360° in 12 hours (720 minutes) or 0.5° per minute. The minute hand rotates through 360° in 60 minutes or 6° per minute. So,the angle between Hr hand and Minutes hand is |0.5*(60*h + m) - 6*m|. For example angle between hr hand and minutes hand at 3hr 30 minutes is |0.5*(60*3 + 30) - 6*30| = |0.5*210 - 90| = 75 degree.

- Pandu May 06, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Hi, Can u explain how 6*30 in there is 90??

- Shweta February 18, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

So basically this works all the time!

float degree= 0.5*(60*h + m) - 6*m;

Can you tell us how did you think of this formula impromptu? Some logic that you must have thought of?


Do enlighten us!

- technical_123 August 18, 2013 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

hour angle = 360 * (hour % 12)/12;
Minute Angle = 6* minutes.

So for 3 .30 hour angle = 360* (3%12)/12 = 90 degrees
minute angle = 6*30 = 180 degrees

So angle = 180 -90 = 90 degrees

- alldone April 26, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

wrong ans, at 3:30 hrs the hour hand is beyond 3 and it cannot form right angle(90 deg) with minutes hand...it's some what less that 90

- thespidy June 27, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

this is the wrong answer. please do watch the clock at 3:30 pm and assess whether the angle is 90 degree or not

- rachita June 14, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

hour hand for 1 hour=30 degree
minute hand for 1 hour =360 degree

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

Minute angle = M*6 (each minute 6 degrees)
Hour angle = H*30 + 30 * (60/M) - each hour 30 degrees + part of 30 degrees depends
on how many minutes.

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

abs(30*(h+m/60) - 60*m)

Time in H:M (5:30, 12:20, etc.)

- AlgoKing!! March 30, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

In the text book, why has the author taken the remainder with 360 i.e. (%360) of the final expression ?
(30h - 5.5m) % 360

- DC June 28, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

abs(h*(360/12)+(m/60)*(360/12) - m*6)

- Anonymous June 06, 2015 | 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