随笔分类 -  LeetCode

LeetCode
摘要:原题: https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/ 思路,如果无从下手,先要了解二叉树的广度优先遍历 BSF : https://www.cnblogs.com/Jomini/p/1203202 阅读全文
posted @ 2019-12-12 23:53 抽象Java 阅读(95) 评论(0) 推荐(0)
摘要:findMedianSortedArrays 基本思路:通过指针按顺序移动来判断大小顺序,思路和有一道用链表求中间值一样; class Solution { public double findMedianSortedArrays(int[] nums1, int[] nums2) { double 阅读全文
posted @ 2019-11-28 12:57 抽象Java 阅读(385) 评论(0) 推荐(0)
摘要:使用中序遍历 阅读全文
posted @ 2019-11-03 14:33 抽象Java 阅读(198) 评论(0) 推荐(0)
摘要:二叉树的遍历 先序遍历:遍历顺序规则为(根左右) 中序遍历:遍历顺序规则为(左根右) 后序遍历:遍历顺序规则为(左右根) 其中,中遍历是从小到大 阅读全文
posted @ 2019-11-03 13:07 抽象Java 阅读(102) 评论(0) 推荐(0)
摘要:LeetCode.62-unique-paths 思路:https://segmentfault.com/a/1190000016315625 阅读全文
posted @ 2019-10-30 12:33 抽象Java 阅读(134) 评论(0) 推荐(0)
摘要:环形链表II 思路 https://www.cnblogs.com/springfor/p/3862125.html https://blog.csdn.net/u010292561/article/details/80444057 假设周长为 S AB + BC + n*S = 2 * ( AB 阅读全文
posted @ 2019-10-29 21:23 抽象Java 阅读(136) 评论(0) 推荐(0)
摘要:Sort_List 在LeetCode 里面,因为只有归并排序的时间复杂度为O(1),所以快速排序用不了,前面两个都没用直接看最后一个归并排序。 冒泡排序(超时了) 快速排序(在leetcode 上面还是超时间了) 归并排序 思路:https://blog.csdn.net/mine_song/ar 阅读全文
posted @ 2019-10-24 22:59 抽象Java 阅读(178) 评论(0) 推荐(0)
摘要:delete-node-in-a-linked-list 注释:这道题简直就是阅读理解 阅读全文
posted @ 2019-10-23 12:12 抽象Java 阅读(90) 评论(0) 推荐(0)
摘要:swapPairs 阅读全文
posted @ 2019-10-22 21:25 抽象Java 阅读(176) 评论(0) 推荐(0)
摘要:参考思路 https://github.com/azl397985856/leetcode/blob/master/problems/3.longestSubstringWithoutRepeatingCharacters.md 阅读全文
posted @ 2019-10-22 09:52 抽象Java 阅读(134) 评论(0) 推荐(0)
摘要:LeeCode String no.3-longest_Substring_Without_Repeating_Characters https://www.cnblogs.com/Jomini/p/11718072.html Array no.62-unique-paths https://www 阅读全文
posted @ 2019-10-22 09:52 抽象Java 阅读(172) 评论(0) 推荐(0)