西门摸鱼

Month: 3 月 2023

LeetCode 115 不同的子序列

2023年3月15日2023年3月15日 feelshu Leave a comment 算法

给定一个字符串 s 和一个字符串 t ,计算在 s 的子序列中 t 出现的个数。 字符串的一个 子序列 是指, […]

Continue reading


LeetCode 114 二叉树展开为链表

2023年3月14日2023年3月14日 feelshu Leave a comment 算法

给你二叉树的根结点 root ,请你将它展开为一个单链表: 展开后的单链表应该同样使用 TreeNode ,其 […]

Continue reading


LeetCode 113 路径总和 II

2023年3月13日2023年3月13日 feelshu Leave a comment 算法

给你二叉树的根节点 root 和一个整数目标和 targetSum ,找出所有 从根节点到叶子节点 路径总和等 […]

Continue reading


LeetCode 112 路径总和

2023年3月12日 feelshu Leave a comment 算法

给你二叉树的根节点 root 和一个表示目标和的整数 targetSum 。判断该树中是否存在 根节点到叶子节 […]

Continue reading


LeetCode 111 二叉树的最小深度

2023年3月10日 feelshu Leave a comment 算法

给定一个二叉树,找出其最小深度。 最小深度是从根节点到最近叶子节点的最短路径上的节点数量。 说明:叶子节点是指 […]

Continue reading


LeetCode 110 平衡二叉树

2023年3月10日 feelshu Leave a comment 算法

给定一个二叉树,判断它是否是高度平衡的二叉树。 本题中,一棵高度平衡二叉树定义为: 一个二叉树每个节点 的左右 […]

Continue reading


LeetCode 109 有序链表转换二叉搜索树

2023年3月10日 feelshu Leave a comment 算法

给定一个单链表的头节点 head ,其中的元素 按升序排序 ,将其转换为高度平衡的二叉搜索树。 本题中,一个高 […]

Continue reading


LeetCode 108 将有序数组转换为二叉搜索树

2023年3月10日2023年3月10日 feelshu Leave a comment 算法

给你一个整数数组 nums ,其中元素已经按 升序 排列,请你将其转换为一棵 高度平衡 二叉搜索树。 高度平衡 […]

Continue reading


LeetCode 107 二叉树的层序遍历 II

2023年3月8日2023年3月8日 feelshu Leave a comment 算法

给你二叉树的根节点 root ,返回其节点值 自底向上的层序遍历 。 (即按从叶子节点所在层到根节点所在的层, […]

Continue reading


LeetCode 106 从中序与后序遍历序列构造二叉树

2023年3月8日 feelshu Leave a comment 算法

给定两个整数数组 inorder 和 postorder ,其中 inorder 是二叉树的中序遍历, pos […]

Continue reading


Posts navigation

Older posts
Newer posts

近期文章

  • LeetCode 199 二叉树的右视图
  • LeetCode 198 打家劫舍
  • LeetCode 197 上升的温度
  • LeetCode 196 删除重复的电子邮箱
  • LeetCode 195 第十行

近期评论

  1. 111 发表在 LeetCode 36 有效的数独
  2. 一位WordPress评论者 发表在 世界,您好!

归档

  • 2023 年 5 月
  • 2023 年 4 月
  • 2023 年 3 月
  • 2023 年 2 月
  • 2023 年 1 月
  • 2022 年 12 月
  • 2022 年 8 月
  • 2022 年 4 月

分类

  • 未分类
  • 算法
dazzling Theme by Colorlib Powered by WordPress
陕ICP备2021008752号-1