Jul 15, 2020 01:29:39 AM
https://leetcode.com/problems/angle-between-hands-of-a-clock/
Given two numbers, hour
and minutes
. Return the smaller angle (in degrees) formed between the hour
and the minute
hand.
Example 1:
Input: hour = 12, minutes = 30
Output: 165
Tags: Algorithm Golang math
Posted in 算法 | 6 Comments
Jun 09, 2020 12:38:52 AM
https://leetcode.com/problems/power-of-four/
Given an integer (signed 32 bits), write a function to check whether it is a power of 4.
Example 1:
Input: 16
Output: true
Tags: Algorithm Golang math
Posted in 算法 | 2 Comments
Jun 09, 2020 12:37:47 AM
https://leetcode.com/problems/power-of-three/
Given an integer, write a function to determine if it is a power of three.
Example 1:
Input: 27
Output: true
Example 2:
Input: 0
Output: false
Tags: Algorithm Golang math
Posted in 算法 | 1 Comments
Jun 09, 2020 12:36:12 AM
https://leetcode.com/problems/power-of-two/
Given an integer, write a function to determine if it is a power of two.
Example 1:
Input: 1
Output: true
Explanation: 20 = 1
Example 2:
Input: 16
Output: true
Explanation: 24 = 16
Tags: Algorithm Golang math
Posted in 算法 | 1 Comments
May 10, 2020 02:13:54 AM
https://leetcode.com/problems/excel-sheet-column-number/
Given a column title as appear in an Excel sheet, return its corresponding column number.
For example:
A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
...
Example 1:
Input: "A"
Output: 1
Tags: Algorithm Golang Math
Posted in 算法 | 0 Comments