数据结构
文章平均质量分 56
小白菜又菜
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Leetcode 236. Lowest Common Ancestor of a Binary Tree
This paper presents a recursive solution to find the lowest common ancestor (LCA) of two nodes in a binary tree. The algorithm recursively searches both subtrees - if the target nodes are found in different subtrees, the current node is the LCA. If both no原创 2026-02-23 13:21:09 · 344 阅读 · 0 评论 -
Leetcode 235. Lowest Common Ancestor of a Binary Search Tree
摘要: 题目要求在二叉搜索树(BST)中找到两个给定节点的最低公共祖先(LCA)。利用BST的性质,若当前节点值小于p和q的值,则搜索右子树;若大于二者值,则搜索左子树;否则当前节点即为LCA。原创 2026-02-23 13:17:00 · 200 阅读 · 0 评论 -
Leetcode 312. Burst Balloons
【代码】Leetcode 312. Burst Balloons。原创 2025-03-22 19:50:36 · 801 阅读 · 0 评论 -
Leetcode 307. Range Sum Query - Mutable
【代码】Leetcode 307. Range Sum Query - Mutable。原创 2025-03-22 19:45:59 · 477 阅读 · 0 评论 -
Leetcode 212. Word Search II
【代码】Leetcode 212. Word Search II。原创 2025-03-22 19:39:14 · 517 阅读 · 0 评论 -
Leetcode 239. Sliding Window Maximum
【代码】Leetcode 239. Sliding Window Maximum。原创 2025-01-17 23:12:23 · 532 阅读 · 0 评论
分享