Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ... Read More
posted @ 2015-08-04 16:28
sunalive
Views(110)
Comments(0)
Diggs(0)
1 class Solution { 2 public: 3 int calculate(int n) 4 { 5 int res = 0; 6 while(n > 0) 7 { 8 int tmp = n%1... Read More
posted @ 2015-08-04 15:57
sunalive
Views(122)
Comments(0)
Diggs(0)
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... Read More
posted @ 2015-08-04 14:35
sunalive
Views(164)
Comments(0)
Diggs(0)
Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].思想很简单逐个比较... Read More
posted @ 2015-08-04 11:18
sunalive
Views(121)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号