刷题笔记
文章平均质量分 83
LeetCode,牛客,剑指offer等题库的刷题笔记。
AlfredaYu
又乖又甜又上头
展开
-
LeetCode#1474
Approach 1: Traverse Linked List and Delete In PlaceIntuitionThe singly linked list can be traversed linearly starting from the head node. As we must delete nn nodes after every mm nodes, we must traverse the first mm nodes, store the m^{th}mthnode and原创 2021-02-09 11:45:59 · 517 阅读 · 0 评论 -
LeetCode#1086. High Five
1086. High FiveExample 1:Input: items =[[1,91],[1,92],[2,93],[2,97],[1,60],[2,77],[1,65],[1,87],[1,100],[2,100],[2,76]]Output: [[1,87],[2,88]] Explanation: The student with ID = 1 gotscores 91, 92, 60, 65, 87, and 100. Their top five average is (100原创 2021-02-08 00:37:55 · 276 阅读 · 0 评论 -
LeetCode#110.Balanced Binary Tree(Tree/Height/DFS/Recursion)
LeetCode#110.Balanced Binary Tree_Tree/Height/DFS/Recursion目录LeetCode#110.Balanced Binary Tree_Tree/Height/DFS/Recursion题目要点基本概念参考资料解题解法一解法二题目Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is def原创 2020-12-23 00:38:11 · 231 阅读 · 3 评论 -
Tree: Height/Depth/Level
Tree: Height/Depth/LevelTree: Height/Depth/LevelHeight110.Balanced Binary TreeDepth104. Maximum Depth of Binary Tree111. Minimum Depth of Binary TreeLevel102. Binary Tree Level Order TraversalTree: Height/Depth/LevelHeightHeight of node:The height o原创 2020-12-23 00:31:27 · 880 阅读 · 1 评论