摘要:
class Solution {public: int reverse(int x) { bool neg = x = 0; 8 while (x) { 9 int d = x % 10;10 if (positiv... 阅读全文
摘要:
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(... 阅读全文
摘要:
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(... 阅读全文
摘要:
class Solution {public: int threeSumClosest(vector &num, int target) { int len = num.size(); if (len target) { q-... 阅读全文
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *... 阅读全文
摘要:
class Solution {public: int maxProfit(vector &prices) { int len = prices.size(); if (len &prices) { int len = prices.size(); ... 阅读全文