bug系列:free(): invalid next size (fast): 0x00000000027d5dd0 ***/leetcode 389找不同

題目: 錯誤提示詳情: 思路 :建立一個頻率數組存放t中每個字母出現的頻率,然後減去s中該字母出現的頻率 最後剩餘頻率不爲0的字母就是添加的那個字母。 錯誤代碼: class Solution { public: char findTheDifference(string s, string t) { vector<int> freq={0};//記錄26個字母在t中的頻率
相關文章
相關標籤/搜索