To the Top
File:  root - text - article - 2019 - 12 - -angles-of-a-clock.txt.txt
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 383 Views, 17435 Search Bots | 49 Words

Subscribe to Feed Burner | Browse | Archive
Hi, here's your problem today. This problem was recently asked by Microsoft:

Given a time in the format of hour and minute, calculate the angle of the hour and minute hand on a clock.


def calcAngle(h, m):
# Fill this in.

print calcAngle(3, 30)
# 75
print calcAngle(12, 30)
# 165
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 383 Views, 17435 Search Bots | 49 Words Subscribe to Feed Burner

Related Articles

  1. YES!!
  2. Algorithm Interview Question: Nth Fibonacci Number
  3. Daily Interview Problem: Queue Using Two Stacks
  4. Staying on a Chess Board
  5. How to Play WAV music under DOS?
  6. Daily Interview Problem: Decode String
  7. Daily Interview Question: Find Cycles in a Graph
  8. Daily Interview Problem: Reconstrunct Binary Tree from Preorder and Inorder Traversals
  9. Daily Interview Problem: Buddy Strings
  10. Fix Brackets

Comments (0)

    Be the first one to comment this page !


Page Edited: May 11 2024 14:36:49 | RSS Subscription
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">