摘要: 反转字符串 class Solution { public: void reverseString(vector<char>& s) { int n = s.size(); for (int i = 0; i < n/2; i++){ char tmp = s[i]; s[i] = s[n-1-i] 阅读全文
posted @ 2023-02-20 21:41 小超不挑食 阅读(13) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: string bestHand(vector<int>& ranks, vector<char>& suits) { int sameNum = 0; if (count(suits.begin(),suits.end(),suits[0]) == 阅读全文
posted @ 2023-02-20 14:14 小超不挑食 阅读(7) 评论(0) 推荐(0) 编辑