摘要:
"欢迎fork and star:Nowcoder Repository github" 30. Substring with Concatenation of All Words 题目 解析 思路:主要运用两个map,先用字典将单词存储一遍,去掉重复元素;然后依次遍历字符串,对每一个位置,查看后面 阅读全文
摘要:
"欢迎fork and star:Nowcoder Repository github" 29. Divide Two Integers 题目 解析 此题主要考虑整数的处理,主要考虑正负号,是否溢出 另外针对int最小负值取绝对值的用法 C++ class Solution_29 { //此题保证一 阅读全文
摘要:
27. Remove Element 题目 解析 C++ class Solution_27 { public: // 直接查看cnt长度的元素值;若是str,最后加上‘\0’ int removeElement(vector& nums, int val) { int cnt = 0; for ( 阅读全文