摘要:
class Solution { public: int maxProfit(vector<int>& prices) { int counter=0;int ans=0; for(int i=1;i<prices.size();i++) { counter+=prices[i]-prices[i- 阅读全文
摘要:
class Solution { public: int singleNumber(vector<int>& nums) { int n=0; for(auto a:nums) { n^=a; } return n; } }; 阅读全文