随笔分类 -  LeetCode刷题总结

摘要:题号为LeetCode剑指Offer题库中的题号。网址:https://leetcode-cn.com/problem-list/xb9nqhhg/ 1~n 整数中 1 出现的次数 43 限制:1 <= n < 2^31 数字范围较大,暴力会超时 class Solution { public in 阅读全文
posted @ 2021-10-15 16:36 GaoYuan206 阅读(127) 评论(0) 推荐(0) 编辑
摘要:题号为LeetCode剑指Offer题库中的题号。网址:https://leetcode-cn.com/problem-list/xb9nqhhg/ 从上到下打印二叉树 32-III class Solution { public List<List<Integer>> levelOrder(Tre 阅读全文
posted @ 2021-10-13 15:32 GaoYuan206 阅读(121) 评论(0) 推荐(0) 编辑
摘要:题号为LeetCode剑指Offer题库中的题号。网址:https://leetcode-cn.com/problem-list/xb9nqhhg/ 合并两个排序链表25 本题思路非常简单,两个链表元素依次比较,压入新链表即可,但有易错点。 public ListNode mergeTwoLists 阅读全文
posted @ 2021-08-10 20:05 GaoYuan206 阅读(62) 评论(2) 推荐(0) 编辑
摘要:LeetCode过程中值得反思的细节(二) 本周10道题,此栏目将每周定期更新。题号为LeetCode剑指Offer题库中的题号。 剪绳子14 这道题需要思考剪绳子的过程 public int cuttingRope(int n) { if(n<=3) return n-1; if(n%3==0)r 阅读全文
posted @ 2021-04-22 23:38 GaoYuan206 阅读(133) 评论(0) 推荐(0) 编辑
摘要:LeetCode过程中值得反思的细节 以下题号均指LeetCode剑指offer题库中的题号 本文章将每周定期更新,当内容达到10题左右时将会开下一节。 二维数组越界问题04 public static void main(String[] args) { int[][]x = {{}}; Syst 阅读全文
posted @ 2021-04-10 22:01 GaoYuan206 阅读(238) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示