摘要:
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... 阅读全文
摘要:
class Solution {public: int singleNumber(int A[], int n) { int tmp = A[0]; for (int i=1; i<n; i++) { tmp ^= A[i]; }... 阅读全文
摘要:
class Solution {public: void connect(TreeLinkNode *root) { dfs(root, NULL); } void dfs(TreeLinkNode* root, TreeLinkNode* counter_p... 阅读全文
摘要:
class Solution {private: vector > result;public: vector > permute(vector &num) { result.clear(); dfs(num, 0); return result... 阅读全文