LeetCode LeetCode: 32. Longest Valid Parentheses 引言 题目链接:https://leetcode.com/problems/longest-valid-parentheses/ 题目大意 给定一个只包含字符'('和')'的字符串,找到最长的有效(括... 发表于2018年12月24日 阅读 332 次 阅读全文
LeetCode LeetCode: 31. Next Permutation 引言 题目链接:https://leetcode.com/problems/next-permutation/ 题目大意 给出一个序列实现下一个排列,它将数字重新排列成满足字典序的下一个更大的数字排列... 发表于2018年11月2日 阅读 507 次 阅读全文
LeetCode LeetCode: 30. Substring with Concatenation of All Words 引言 题目链接:https://leetcode.com/problems/substring-with-concatenation-of-all-words/ 题目大意 给出一个长字符串s和一个字符... 发表于2018年10月30日 阅读 429 次 阅读全文
LeetCode LeetCode: 29. Divide Two Integers 引言 题目链接:https://leetcode.com/problems/divide-two-integers/ 题目大意 给定一个除数和被除数,要求不使用除法、乘法以及取模操作计算。返回两个数做... 发表于2018年10月27日 阅读 314 次 阅读全文
LeetCode LeetCode: 28. Implement strStr() 引言 题目链接:https://leetcode.com/problems/implement-strstr/ 题目大意 实现 返回haystack中第一次出现模式串的索引,如果模式串不是haysta... 发表于2018年10月26日 阅读 290 次 阅读全文
LeetCode LeetCode: 27. Remove Element 引言 题目链接:https://leetcode.com/problems/remove-element/ 题目大意 给定数组nums和值val,在适当位置删除该值的所有实例并返回新长度。 Hint:... 发表于2018年10月25日 阅读 206 次 阅读全文
LeetCode LeetCode: 26. Remove Duplicates from Sorted Array 引言 题目链接:https://leetcode.com/problems/remove-duplicates-from-sorted-array/ 题目大意 给定排序的数组nums,就地删除重复项,... 发表于2018年10月25日 阅读 250 次 阅读全文
LeetCode LeetCode: 25. Reverse Nodes in k-Group 引言 题目链接:https://leetcode.com/problems/reverse-nodes-in-k-group/ 题目大意 给定一个链表,一次反转链表的k个节点(每k个节点翻转一次),最... 发表于2018年10月24日 阅读 271 次 阅读全文
LeetCode LeetCode: 24. Swap Nodes in Pairs 引言 题目链接:https://leetcode.com/problems/swap-nodes-in-pairs/ 题目大意 将链表中的节点两两交换。 Example Given 1->2-&... 发表于2018年10月23日 阅读 275 次 阅读全文
LeetCode LeetCode: 23. Merge k Sorted Lists 引言 题目链接:https://leetcode.com/problems/merge-k-sorted-lists/description/ 题目大意 合并k个已排序的链表并将其作为一个排序列表返回... 发表于2018年10月16日 阅读 313 次 阅读全文