題目:
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.
計算階層算出來的數值後面有幾個0。
Given an integer n, return the number of trailing zeroes in n!.
n
n!
Follow up: Could you write a solution that works in logarithmic time complexity?
數字轉字母,26進制。
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
For example:
1 -> A 2 -> B 3 -> C …
26進位轉換成10進位。
Given a column title as appear in an Excel sheet, return its corresponding column number.
A -> 1 B -> 2 C -> 3 …
return 出現最多次的element,出現次數最多次就是超過n/2次。
Given an array nums of size n, return the majority element.
nums
The majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that…
⌊n / 2⌋