Xenonon
码龄5年
关注
提问 私信
  • 博客:135,268
    问答:1,173
    136,441
    总访问量
  • 91
    原创
  • 365,427
    排名
  • 9
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:上海市
  • 加入CSDN时间: 2020-02-12
博客简介:

Xenonon的博客

查看详细资料
个人成就
  • 获得141次点赞
  • 内容获得37次评论
  • 获得175次收藏
  • 代码片获得16,126次分享
创作历程
  • 92篇
    2020年
成就勋章
创作活动更多

超级创作者激励计划

万元现金补贴,高额收益分成,专属VIP内容创作者流量扶持,等你加入!

去参加
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

leetcode-560 和为K的子数组 Java

https://leetcode-cn.com/problems/subarray-sum-equals-k/solution/he-wei-kde-zi-shu-zu-by-leetcode-solution/方法一:class Solution { public int subarraySum(int[] nums, int k) { int count = 0, pre = 0; HashMap <Integer, Integer> mp =.
原创
发布博客 2020.05.16 ·
419 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-136 只出现一次的数字 Java

https://leetcode-cn.com/problems/single-number/solution/xue-suan-fa-jie-guo-xiang-dui-yu-guo-cheng-bu-na-y/方法一:哈希表class Solution { public int singleNumber(int[] nums) { Map<Integer, Integer> map = new HashMap<>(); for (I.
原创
发布博客 2020.05.14 ·
438 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-102 二叉树的层序遍历 Java

https://leetcode-cn.com/problems/binary-tree-level-order-traversal/solution/tao-mo-ban-bfs-he-dfs-du-ke-yi-jie-jue-by-fuxuemin/方法一:DFS/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * Tree.
原创
发布博客 2020.05.13 ·
426 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-155 最小栈 Java

https://leetcode-cn.com/problems/min-stack/solution/shi-yong-fu-zhu-zhan-tong-bu-he-bu-tong-bu-python-/方法一:辅助栈和数据栈同步import java.util.Stack;class MinStack { private Stack<Integer> data; private Stack<Integer> helper; /** initial.
原创
发布博客 2020.05.12 ·
283 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-50 Pow(x, n) Python Java

https://leetcode-cn.com/problems/powx-n/solution/powx-n-by-leetcode-solution/方法一:递归Pythonclass Solution: def myPow(self, x: float, n: int) -> float: def quickMul(N): if N == 0: return 1.0 y = quic.
原创
发布博客 2020.05.11 ·
212 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-236 二叉树的最近公共祖先 Java

https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/solution/er-cha-shu-de-zui-jin-gong-gong-zu-xian-by-leetc-2/方法一:递归/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * .
原创
发布博客 2020.05.10 ·
185 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-572 另一个树的子树

https://leetcode-cn.com/problems/subtree-of-another-tree/solution/xiong-mao-shua-ti-python3-di-gui-pan-duan-liang-ke/# Definition for a binary tree node.# class TreeNode:# def __init__(self, ...
原创
发布博客 2020.05.07 ·
168 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-983 最低票价 Python

https://leetcode-cn.com/problems/minimum-cost-for-tickets/solution/zui-di-piao-jie-by-leetcode-solution/方法一:class Solution { int[] costs; Integer[] memo; Set<Integer> dayset; ...
原创
发布博客 2020.05.06 ·
197 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-98 验证二叉搜索树 Java

https://leetcode-cn.com/problems/validate-binary-search-tree/solution/yan-zheng-er-cha-sou-suo-shu-by-leetcode-solution/方法一:中序遍历/** * Definition for a binary tree node. * public class TreeNode {...
原创
发布博客 2020.05.05 ·
162 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-98 验证二叉搜索树 Python

https://leetcode-cn.com/problems/validate-binary-search-tree/solution/zhong-xu-bian-li-qing-song-na-xia-bi-xu-miao-dong-/方法一:递归# Definition for a binary tree node.# class TreeNode:# def __in...
原创
发布博客 2020.05.05 ·
231 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

leetcode-45 跳跃游戏Ⅱ Java

https://leetcode-cn.com/problems/jump-game-ii/solution/tiao-yue-you-xi-ii-by-leetcode-solution/方法一:贪心class Solution { public int jump(int[] nums) { int position = nums.length - 1; ...
原创
发布博客 2020.05.04 ·
202 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-53 最大子序和 Java

https://leetcode-cn.com/problems/maximum-subarray/solution/bao-li-qiu-jie-by-pandawakaka/方法一:贪心class Solution { public int maxSubArray(int[] nums) { int cur = 0; int res = nums...
原创
发布博客 2020.05.03 ·
167 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-3 滑动窗口 Python

方法一:class Solution: def lengthOfLongestSubstring(self, s: str) -> int: occ = set() n = len(s) rk, ans = -1, 0 for i in range(n): if i != 0: ...
原创
发布博客 2020.05.02 ·
332 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-21合并两个有序链表

https://leetcode-cn.com/problems/merge-two-sorted-lists/solution/he-bing-liang-ge-you-xu-lian-biao-by-leetcode-solu/方法一:迭代# Definition for singly-linked list.# class ListNode:# def __init__(...
原创
发布博客 2020.05.01 ·
171 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-202 快乐数 Python

https://leetcode-cn.com/problems/happy-number/solution/kuai-le-shu-by-leetcode-solution/方法一:集合class Solution: def isHappy(self, n: int) -> bool: if n < 0: return Fals...
原创
发布博客 2020.04.30 ·
297 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-1095 山脉数组中查找目标值 Python

方法一:二分查找https://leetcode-cn.com/problems/find-in-mountain-array/solution/shan-mai-shu-zu-zhong-cha-zhao-mu-biao-zhi-by-leet/# """# This is MountainArray's API interface.# You should not implemen...
原创
发布博客 2020.04.29 ·
185 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-面55-Ⅰ 数组中数字出现的次数

方法一:字典https://leetcode-cn.com/problems/shu-zu-zhong-shu-zi-chu-xian-de-ci-shu-lcof/solution/python3-zi-dian-qiao-jie-by-mu-ren-6/class Solution: def singleNumbers(self, nums: List[int]) -> ...
原创
发布博客 2020.04.28 ·
152 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-23 合并K个排序链表 Python

https://leetcode-cn.com/problems/merge-k-sorted-lists/solution/xiong-mao-shua-ti-python3-3chong-jie-fa-bao-li-you/方法一:暴力法# Definition for singly-linked list.# class ListNode:# def __init__(s...
原创
发布博客 2020.04.26 ·
163 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

leetcode-46 全排列 Python

方法一:class Solution: def permute(self, nums: List[int]) -> List[List[int]]: return list(itertools.permutations(nums))方法二:class Solution: def permute(self, nums: List[int]) ->...
原创
发布博客 2020.04.25 ·
150 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Error: 错误: 编码 GBK 的不可映射字符 (0x93)

解决方法:编译时加上 -encoding utf-8例如:javac -encoding utf-8 NBody.java
原创
发布博客 2020.04.25 ·
1138 阅读 ·
2 点赞 ·
0 评论 ·
2 收藏
加载更多