上一页 1 2 3 4 5 6 7 8 ··· 17 下一页
摘要: 反转字符串 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 小超不挑食 阅读(11) 评论(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 小超不挑食 阅读(3) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> result; sort(nums.begin(), nums.end()); for(int i = 0; 阅读全文
posted @ 2023-02-16 13:47 小超不挑食 阅读(10) 评论(0) 推荐(0) 编辑
摘要: PCM数据格式: 如果数据是 float 格式,则值域为 [-1.0, 1.0] 如果数据是 S16 (int16) 格式,则值域为 [-32767, +32767] #include <stdint.h> inline int16_t PCMFloat32ToInt16FmtConvert(flo 阅读全文
posted @ 2023-02-06 15:37 小超不挑食 阅读(262) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: bool evaluateTree(TreeNode* root) { return dfs(root); } bool dfs(TreeNode * root){ switch(root->val){ case(0) : return false; 阅读全文
posted @ 2023-02-06 14:19 小超不挑食 阅读(11) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 17 下一页