位操作2的幂次数2 104 1008 100016 10000... 1 class Solution { 2 /* 3 * @param n: An integer 4 * @return: True or false 5 */ 6 public bo...
分类:
其他好文 时间:
2015-06-30 14:29:52
阅读次数:
102
题目:
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["...
分类:
编程语言 时间:
2015-06-30 13:05:37
阅读次数:
136
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-06-30 12:47:25
阅读次数:
82
一、Customer中包含的字段:private static final long serialVersionUID = 1L; private Integer id; private String sex; private double salary; private Double comm; ...
分类:
Web程序 时间:
2015-06-30 12:28:14
阅读次数:
134
1:StringBuffer(掌握) (1)用字符串做拼接,比较耗时并且也耗内存,而这种拼接操作又是比较常见的,为了解决这个问题,Java就提供了 一个字符串缓冲区类。StringBuffer供我们使用。 (2)StringBuffer的构造方法 A:StringBuffer() B:Stri...
分类:
编程语言 时间:
2015-06-30 08:56:33
阅读次数:
144
Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.题目大意:给...
分类:
其他好文 时间:
2015-06-30 07:45:12
阅读次数:
487
class Solution {public: int romanToInt(string s) { std::unordered_map hm; hm['M'] = 1000; hm['D'] = 500; hm['C'] = ...
分类:
其他好文 时间:
2015-06-30 06:34:48
阅读次数:
105
char dict[] = {'I', 'V', 'X', 'L', 'C', 'D', 'M'};class Solution { public: string pattern(int v, int level) { int offset = int(log10(l...
分类:
其他好文 时间:
2015-06-30 06:34:47
阅读次数:
121
1 class Solution { 2 public: 3 /** 4 * @param A: sorted integer array A which has m elements, 5 * but size of A is m+n 6 ...
分类:
编程语言 时间:
2015-06-29 23:48:23
阅读次数:
346
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"].题目大意:给一个有...
分类:
其他好文 时间:
2015-06-29 23:47:05
阅读次数:
116