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 | 640 Views, 20381 Search Bots | 49 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 640 Views, 20381 Search Bots | 49 Words
| 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.
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Cateogry: Computing | 640 Views, 20381 Search Bots | 49 Words 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
Related Articles
- Floor and Ceiling of a Binary Search Tree
- Daily Interview Problem: Buddy Strings
- A trick for getting good at coding interviews FASTER
- Patterns for breaking down questions you haven
- Daily Interview Problem: Full Binary Tree
- Daily Interview Problem: Look and Say Sequence
- Daily Interview Problem: Queue Using Two Stacks
- Find the non-duplicate number
- Daily Interview Problem: Count Number of Unival Subtrees
- Daily Interview Problem: Given two arrays, write a function to compute their intersection.
©2006~2024 SteakOverCooked - 0.00798 Seconds(s) - 2439.203 KB/s - 35 Online Memory: 492.78 KB
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
How to Cook a Perfect Steak? | <meta name="robots" content="index, follow">
18:54:01 up 13 days, 18:33, 2 users, load average: 0.98, 0.86, 0.73 - Server PHP Version: 7.4.33
Comments (0)
Read & Write - Normal - Mini - Post - All Comments - Statistics
Be the first one to comment this page !