Loading

11 2021 档案

摘要:https://www.zhihu.com/question/27797637?sort=created 阅读全文
posted @ 2021-11-24 21:34 Zhbeii 阅读(38) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ 使用滑动窗口,max会一直更新结束之前的最长的长度, 在最初的时候每一次遇到一个键,都会添加到map,后面如果遇到重复的,就会把走过的相同 阅读全文
posted @ 2021-11-19 19:17 Zhbeii 阅读(60) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/xyls12345/article/details/26256693 阅读全文
posted @ 2021-11-17 22:22 Zhbeii 阅读(21) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/container-with-most-water/ 使用双指针 class Solution { public int maxArea(int[] height) { int i = 0, j = height.length - 1 阅读全文
posted @ 2021-11-14 13:06 Zhbeii 阅读(39) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/er-wei-shu-zu-zhong-de-cha-zhao-lcof/ 思路: int[][]的时候,二维数组.length返回的是数组的行数 把这个转化成图,搜索二叉树 class Solution { public boole 阅读全文
posted @ 2021-11-14 10:04 Zhbeii 阅读(28) 评论(0) 推荐(0)
摘要:移动数据不如移动计算 阅读全文
posted @ 2021-11-12 23:27 Zhbeii 阅读(31) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/single-number/ 任何数和 00 做异或运算,结果仍然是原来的数,即 a \oplus 0=aa⊕0=a。 任何数和其自身做异或运算,结果是 00,即 a \oplus a=0a⊕a=0。 异或运算满足交换律和结合律 cl 阅读全文
posted @ 2021-11-12 21:38 Zhbeii 阅读(43) 评论(0) 推荐(0)
摘要:因为是有序的,所以用双指针就行 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 阅读(54) 评论(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 阅读(49) 评论(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 阅读(73) 评论(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 阅读(51) 评论(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 阅读(37) 评论(0) 推荐(0)
摘要:https://leetcode-cn.com/problems/dui-cheng-de-er-cha-shu-lcof/ class Solution { public boolean isSymmetric(TreeNode root) { return root == null ? true 阅读全文
posted @ 2021-11-09 22:17 Zhbeii 阅读(36) 评论(0) 推荐(0)
摘要:新手刚学hadoop,啥也不懂,跟着视频上的老师敲,因为懒,在代码中少加了一个目录, 重点是最后一句,输出路径不能是已经存在的,最后一个目录地址必须是还没有被创建的,解决把以前建的目录删掉或者在代码中加一个还不存在的目录地址 2021-11-06 16:38:56,759 WARN [org.apa 阅读全文
posted @ 2021-11-06 16:49 Zhbeii 阅读(1158) 评论(0) 推荐(0)