摘要:
Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
摘要:
Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
摘要:
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 思路: 罗马数字有如下符号: 基本字符 I V X L C D M 对应阿拉伯数字 阅读全文
摘要:
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
摘要:
Given a string representing an expression of fraction addition and subtraction, you need to return the calculation result in string format. The final 阅读全文
摘要:
Given the coordinates of four points in 2D space, return whether the four points could construct a square.The coordinate (x,y) of a point is represent 阅读全文
摘要:
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given an integer array 阅读全文
摘要:
Description:Count the number of prime numbers less than a non-negative number, n. 思路: 参考http://www.cnblogs.com/TonyYPZhang/p/5138018.html给出的方案以及wiki的方 阅读全文
摘要:
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 阅读全文
摘要:
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文