摘要:
https://leetcode.cn/problems/path-sum-ii/ class Solution { private int targetSum; private List<List<Integer>> res = new ArrayList<>(); public List<Lis 阅读全文
摘要:
https://leetcode.cn/problems/merge-sorted-array/ class Solution { public void merge(int[] nums1, int m, int[] nums2, int n) { // 要求O(m + n) // 双指针,指针i 阅读全文
摘要:
https://leetcode.cn/problems/length-of-last-word 简单字符串 class Solution { public int lengthOfLastWord(String s) { // 双指针,前指针指向单词首字母,后指针从单词首字母遍历至单词最后一个字母 阅读全文