上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页
摘要: 链接:https://leetcode-cn.com/problems/two-sum/ 思路 使用HashMap存储数据从而节省第二层循环寻找数字的时间 代码 class Solution { public int[] twoSum(int[] nums, int target) { Map<In 阅读全文
posted @ 2020-06-01 18:56 景云ⁿ 阅读(43) 评论(0) 推荐(0)
摘要: 1446. 连续字符 链接:https://leetcode-cn.com/problems/consecutive-characters/ 代码 class Solution { public: int maxPower(string s) { int tmp = 1, ans = 1; for 阅读全文
posted @ 2020-05-29 15:35 景云ⁿ 阅读(70) 评论(0) 推荐(0)
摘要: 链接:https://leetcode cn.com/problems/maximum depth of binary tree/ 递归 阅读全文
posted @ 2020-04-06 19:42 景云ⁿ 阅读(57) 评论(0) 推荐(0)
摘要: 链接:https://leetcode cn.com/problems/binary tree zigzag level order traversal/ 阅读全文
posted @ 2020-04-06 19:39 景云ⁿ 阅读(78) 评论(0) 推荐(0)
摘要: 链接:https://leetcode cn.com/problems/binary tree level order traversal/ 阅读全文
posted @ 2020-04-05 21:16 景云ⁿ 阅读(65) 评论(0) 推荐(0)
摘要: 链接:https://leetcode cn.com/problems/symmetric tree/ 阅读全文
posted @ 2020-04-05 21:05 景云ⁿ 阅读(84) 评论(0) 推荐(0)
摘要: 链接:https://leetcode cn.com/problems/same tree/ 阅读全文
posted @ 2020-04-05 21:01 景云ⁿ 阅读(113) 评论(0) 推荐(0)
摘要: 链接:https://leetcode-cn.com/problems/validate-binary-search-tree/ 算法:中序遍历 /** * Definition for a binary tree node. * public class TreeNode { * int val; 阅读全文
posted @ 2020-04-05 20:53 景云ⁿ 阅读(163) 评论(0) 推荐(0)
摘要: 831. KMP字符串 链接:https://www.acwing.com/problem/content/833/ $next[i] = j$ 代表 $p[i, j] = p[i j + 1, j]$ 阅读全文
posted @ 2020-04-05 16:55 景云ⁿ 阅读(275) 评论(0) 推荐(0)
摘要: 785. 快速排序 链接:https://www.acwing.com/problem/content/787/ 795. 前缀和 https://www.acwing.com/problem/content/797/ 阅读全文
posted @ 2020-04-03 20:29 景云ⁿ 阅读(1815) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 28 下一页