Interview Questions

  • View all interview questions
  • blank
  • Simple clock angle
    The question is as follows:
    You will be given a number N that represents where the minute hand currently is on a clock. Your program should return the angle that is formed by the minute hand and the 12 o'clock mark on the clock.

    You need to be a premium member to see the rest of this question and code.

    Become a Premium Member

    With our large collection of challengs, tutorials, and solutions, we make it easy for you to become a better coder, prepare for interviews, and learn new skills from more experienced coders.

    “I love Coderbyte challenges! What an awesome way to work on your javascript and algorithm skills.“ ― Rob Rosario
    • 200+ Coding Challenges
    • Mock Interview Questions
    • 500,000+ Code Solutions
    • Algorithm Tutorials
    • Interview Prep Courses
    mrdaniel published this on 12/30/15 | javascript, bootcamp, Fullstack Academy
  • +
  • 0
  • -
  • I think it should give the same result if we do this :
    print simpleClockAngle(15)
    or this:
    print simpleClockAngle(45)
    , but it doesn't
  • +
  • 0
  • -
  • Maybe also mod the whole thing by 360 to be safe.
    return (6 * num) % 360;
    Login to submit a comment