Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-08-03 22:14:10
阅读次数:
172
Rotate an array ofnelements to the right byksteps.For example, withn= 7 andk= 3, the array[1,2,3,4,5,6,7]is rotated to[5,6,7,1,2,3,4].Note:Try to come...
分类:
其他好文 时间:
2015-08-03 20:54:33
阅读次数:
132
Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the largest formed num...
分类:
其他好文 时间:
2015-08-03 00:55:11
阅读次数:
133
All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ...
分类:
其他好文 时间:
2015-08-03 00:51:18
阅读次数:
157
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:
其他好文 时间:
2015-08-02 19:47:38
阅读次数:
107
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a...
分类:
其他好文 时间:
2015-08-02 19:41:27
阅读次数:
126
Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ...
分类:
其他好文 时间:
2015-08-02 18:02:21
阅读次数:
158
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating,...
分类:
其他好文 时间:
2015-08-02 16:46:27
阅读次数:
93
Compare two version numbersversion1andversion2.Ifversion1>version2return 1, ifversion1len2){ for(int i=len2;i0?1:-1; return 0; }}
分类:
其他好文 时间:
2015-08-02 16:34:21
阅读次数:
120
A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index....
分类:
其他好文 时间:
2015-08-02 13:14:46
阅读次数:
105