上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

2015年12月17日

摘要: class Solution {public: int hammingWeight(uint32_t n) { string aaa = toBinary(n); in count = 0; for(int i = 0; i = 0; i--) ... 阅读全文
posted @ 2015-12-17 16:32 Oliver-cs 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 感谢:http://blog.csdn.net/xiaofei2010/article/details/7434737 以及:http://www.cnblogs.com/nzbbody/p/3504199.html1. int转string(更多参见:http://www.cnblogs.com... 阅读全文
posted @ 2015-12-17 16:23 Oliver-cs 阅读(1997) 评论(0) 推荐(0) 编辑

2015年12月16日

摘要: 本来没想出来,刚才突然想到,可以用“头插法”来反转Reverse Linked ListMy SubmissionsQuestionTotal Accepted:66556Total Submissions:182891Difficulty:EasyReverse a singly linked l... 阅读全文
posted @ 2015-12-16 16:15 Oliver-cs 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 这道题本质上不难,难的是细节处理,容易出错。第一遍写的代码越改越大,越臃肿,此时,不如推倒重写,果然,第二次一遍过。Remove Duplicates from Sorted ListMy SubmissionsQuestionTotal Accepted:90731Total Submission... 阅读全文
posted @ 2015-12-16 15:48 Oliver-cs 阅读(188) 评论(0) 推荐(0) 编辑

2015年12月15日

摘要: 今天遇到的题都挺难的,不容易有会做的。下面是代码,等明天看看Discuss里面有没有简单的方法~Majority ElementMy SubmissionsQuestionTotal Accepted:79833Total Submissions:208075Difficulty:EasyGiven... 阅读全文
posted @ 2015-12-15 23:03 Oliver-cs 阅读(155) 评论(0) 推荐(0) 编辑

2015年12月14日

摘要: Valid AnagramMy SubmissionsQuestionTotal Accepted:43694Total Submissions:111615Difficulty:EasyGiven two stringssandt, write a function to determine if... 阅读全文
posted @ 2015-12-14 21:03 Oliver-cs 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Product of Array Except SelfTotal Accepted:26470Total Submissions:66930Difficulty:MediumGiven an array ofnintegers wheren> 1,nums, return an arrayoutp... 阅读全文
posted @ 2015-12-14 20:46 Oliver-cs 阅读(194) 评论(0) 推荐(0) 编辑

2015年12月13日

摘要: Invert Binary TreeTotal Accepted:54994Total Submissions:130742Difficulty:EasyInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4... 阅读全文
posted @ 2015-12-13 12:01 Oliver-cs 阅读(185) 评论(0) 推荐(0) 编辑

2015年12月12日

摘要: Same TreeTotal Accepted:97481Total Submissions:230752Difficulty:EasyGiven two binary trees, write a function to check if they are equal or not.Two bin... 阅读全文
posted @ 2015-12-12 21:23 Oliver-cs 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 终于碰到一道水题,睡觉去~Move ZeroesTotal Accepted:37369Total Submissions:88383Difficulty:EasyGiven an arraynums, write a function to move all0's to the end of it... 阅读全文
posted @ 2015-12-12 15:52 Oliver-cs 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

导航