摘要:
因为是有序的,所以用双指针就行 https://leetcode-cn.com/problems/he-wei-sde-liang-ge-shu-zi-lcof/ class Solution { public int[] twoSum(int[] nums, int target) { int i 阅读全文
posted @ 2021-11-10 23:37
Zhbeii
阅读(37)
评论(0)
推荐(0)
摘要:
https://leetcode-cn.com/problems/fan-zhuan-dan-ci-shun-xu-lcof/ 使用双指针 **部分API解释:** **StringBuilder**:Java编译器对String做了特殊处理,使得我们可以直接用+拼接字符串。虽然可以直接 拼接字符串 阅读全文
posted @ 2021-11-10 23:16
Zhbeii
阅读(39)
评论(0)
推荐(0)
摘要:
https://leetcode-cn.com/problems/er-cha-shu-de-shen-du-lcof/ 大体的思路都是一样的,但是代码有两种写法,值得自己去学习 DFS class Solution { public int maxDepth(TreeNode root) { if 阅读全文
posted @ 2021-11-10 16:50
Zhbeii
阅读(51)
评论(0)
推荐(0)
摘要:
https://leetcode-cn.com/problems/liang-ge-lian-biao-de-di-yi-ge-gong-gong-jie-dian-lcof/ 这道题我还是不知道为什么会超时 做题的时候不要去回想题解的代码a,要去自己理解,自己敲自己的代码 错误示范: 超时 pub 阅读全文
posted @ 2021-11-10 15:38
Zhbeii
阅读(37)
评论(0)
推荐(0)
摘要:
https://leetcode-cn.com/problems/lian-xu-zi-shu-zu-de-zui-da-he-lcof/ 代码能够自己理解了,但是题解中的一些问题还是没有解决 class Solution { public int maxSubArray(int[] nums) { 阅读全文
posted @ 2021-11-10 11:05
Zhbeii
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号