LeetCode: 14. Longest Common Prefix LeetCode

LeetCode: 14. Longest Common Prefix

引言 题目链接:https://leetcode.com/problems/longest-common-prefix/description/ 题目大意 给出一串单词,编写一个函数找到这串单词的最长...
阅读全文
LeetCode: 23. Merge k Sorted Lists LeetCode

LeetCode: 23. Merge k Sorted Lists

引言 题目链接:https://leetcode.com/problems/merge-k-sorted-lists/description/ 题目大意 合并k个已排序的链表并将其作为一个排序列表返回...
阅读全文
LeetCode: 15. 3Sum LeetCode

LeetCode: 15. 3Sum

引言 题目链接:https://leetcode.com/problems/3sum/description/ 题目大意 给出一个包含n个整数的数组nums,这个数组是否存在元素有a,b,c使得,找出...
阅读全文
LeetCode: 28. Implement strStr() LeetCode

LeetCode: 28. Implement strStr()

引言 题目链接:https://leetcode.com/problems/implement-strstr/ 题目大意 实现 返回haystack中第一次出现模式串的索引,如果模式串不是haysta...
阅读全文
LeetCode: 25. Reverse Nodes in k-Group LeetCode

LeetCode: 25. Reverse Nodes in k-Group

引言 题目链接:https://leetcode.com/problems/reverse-nodes-in-k-group/ 题目大意 给定一个链表,一次反转链表的k个节点(每k个节点翻转一次),最...
阅读全文