摘要: class Solution {public: int singleNumber(int A[], int n) { sort(A, A+n); int last = A[0]; int time = 1; for (int i=1; i... 阅读全文
posted @ 2014-04-22 22:18 卖程序的小歪 阅读(138) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: int singleNumber(int A[], int n) { int tmp = A[0]; for (int i=1; i<n; i++) { tmp ^= A[i]; }... 阅读全文
posted @ 2014-04-22 21:55 卖程序的小歪 阅读(161) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: void connect(TreeLinkNode *root) { dfs(root, NULL); } void dfs(TreeLinkNode* root, TreeLinkNode* counter_p... 阅读全文
posted @ 2014-04-22 21:45 卖程序的小歪 阅读(205) 评论(0) 推荐(0) 编辑
摘要: class Solution {private: vector > result;public: vector > permute(vector &num) { result.clear(); dfs(num, 0); return result... 阅读全文
posted @ 2014-04-22 00:05 卖程序的小歪 阅读(109) 评论(0) 推荐(0) 编辑