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 | 638 Views, 20350 Search Bots | 49 Words
| Browse | Archive
Tags: 每日算法题, 算法, 数据结构, 面试题, Daily Interview Problem, Data Structures and Algorithms, Computer Programming, Python, | English | Home Page | Category: Computing | 638 Views, 20350 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 | 638 Views, 20350 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
- Making a Height Balanced Binary Search Tree
- Plus One
- Algorithm Interview: Convert Roman Numerals to Decimal
- CPU Utilization
- Reverse a Linked List
- Daily Interview Problem: Decode String
- Algorithm Interview: Permutations of numbers
- A trick for getting good at coding interviews FASTER
- Algorithm Interview Question: H-Index
- Daily Interview Problem: Product of Array Except Self
©2006~2024 SteakOverCooked - 0.00685 Seconds(s) - 7821.058 KB/s - 43 Online Memory: 531.26 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="noindex, 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 !