摘要: 题目:http://www.nowcoder.com/practice/d0267f7f55b3412ba93bd35cfa8e8035C++ 1 /** 2 * struct ListNode { 3 * int val; 4 * struct ListNode *n... 阅读全文
posted @ 2016-01-07 17:15 ZH奶酪 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.nowcoder.com/practice/4060ac7e3e404ad1a894ef3e17650423C++ 1 class Solution { 2 public: 3 void replaceSpace(char *str,int len) { 4 ... 阅读全文
posted @ 2016-01-07 17:14 ZH奶酪 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.nowcoder.com/practice/abc3fe2ce8e146608e868a70efebf62eC++ 1 class Solution { 2 public: 3 bool Find(vector > array,int target) { 4 ... 阅读全文
posted @ 2016-01-07 17:13 ZH奶酪 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 对于刚刚来到一个新的团队或是新环境的“新人”来说,当你无所事事且故作投入之时,听着几个“老人”在自己可视范围之外或严肃或轻松的讨论着业务,其措辞拿捏精准,语气抑扬顿挫,期间,涉及到一些的概念可能难免让你不明觉厉……然默默道:”高端,大气,上档次!“ ”不识庐山真面目,只缘身在此山中“,对于一些术... 阅读全文
posted @ 2016-01-07 15:22 ZH奶酪 阅读(2647) 评论(0) 推荐(0) 编辑
摘要: 一篇解析比较详细的文章:http://www.acmerblog.com/leetcode-single-number-ii-5394.htmlC++解法(1)求出每个比特位的数目,然后%3,如果这个比特位只出现1次,那么这比特位就会余1,否则就会整除。把每个余下的比特位求出来,就知道是哪个数只出现... 阅读全文
posted @ 2016-01-07 14:14 ZH奶酪 阅读(325) 评论(0) 推荐(0) 编辑
摘要: C++(1)异或操作3^3=0(2)for (auto &i : Obejuct) {} 1 class Solution { 2 public: 3 /** 4 * @param A: Array of integers. 5 * return: The single ... 阅读全文
posted @ 2016-01-07 13:36 ZH奶酪 阅读(290) 评论(0) 推荐(0) 编辑
摘要: C++stack, push(), pop(), top(), empty(), size() 1 class Solution { 2 public: 3 /** 4 * @param s A string 5 * @return whether the string ... 阅读全文
posted @ 2016-01-07 13:25 ZH奶酪 阅读(224) 评论(0) 推荐(0) 编辑
摘要: C++(1)把interval数组中的所有start和所有end放在同一个数组中,然后进行排序,遇到start就起飞一架飞机,遇到一架end就降落一架飞机,所以start有个+1属性,end有个-1属性,这样就可以根据排序之后的数组得知任意时间飞行中的飞机的数量了(2)pair,make_pair,... 阅读全文
posted @ 2016-01-07 13:12 ZH奶酪 阅读(345) 评论(0) 推荐(0) 编辑
摘要: C++(1) null(2) length is 0(3) return value(4) strlen 1 class Solution { 2 public: 3 /** 4 * Returns a index to the first occurrence of target... 阅读全文
posted @ 2016-01-07 11:26 ZH奶酪 阅读(376) 评论(0) 推荐(0) 编辑
摘要: C++string::substr(start_pos, length)vector::push_back(element) 1 class Solution { 2 public: 3 vector restoreIpAddresses(string s) { 4 vect... 阅读全文
posted @ 2016-01-07 10:37 ZH奶酪 阅读(263) 评论(0) 推荐(0) 编辑