摘要:
problem 414. Third Maximum Number solution 思路:用三个变量first, second, third来分别保存第一大、第二大和第三大的数,然后遍历数组。 注意: 1. 数据类型对应的最小值表示; 2. 赋值时需要判断是否为最小值; 参考 1. Leetcod 阅读全文
摘要:
problem Sum of Two Integers 不知道为什么一直出错; runtime error: left shift of negative value -2147483648 (solution.cpp) 参考 1. Leetcode_Sum of Two Integers; 完 不 阅读全文
摘要:
problem 350. Intersection of Two Arrays II 不是特别明白这道题的意思,例子不够说明问题; 是按顺序把相同的元素保存下来,还是排序,但是第二个例子没有重复.... 参考 1. Leetcode_350. Intersection of Two Arrays I 阅读全文
摘要:
problem 345. Reverse Vowels of a String class Solution { public: string reverseVowels(string s) { int left = 0, right =s.size()-1; char chl, chr; whil 阅读全文