自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

晚来天欲雪,能饮一杯无?

纸上得来终觉浅,绝知此事要躬行。——陆游

  • 博客(4)
  • 收藏
  • 关注

原创 【Leetcode】104. Maximum Depth of Binary Tree

https://leetcode-cn.com/problems/maximum-depth-of-binary-tree/ 文章目录1. 描述2. 解决2.1 递归(DFS——深度优先)2.2 迭代(BFS——广度优先) 1. 描述 Given the root of a binary tree, return its maximum depth. A binary tree’s maximum depth is the number of nodes along the longest path fro

2021-11-19 01:34:21 286

原创 【Leetcode】101. Symmetric Tree

https://leetcode-cn.com/problems/symmetric-tree/ 文章目录1. 描述2. 解决2.1 递归——DFS(深度优先)2.2 迭代——BFS(深度优先) 1. 描述 Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). 2. 解决 2.1 递归——DFS(深度优先) 递归思想: 左孩子的左孩子 = 右

2021-11-16 20:11:06 210

原创 【Leetcode】100. Same Tree

https://leetcode-cn.com/problems/same-tree/ 文章目录1. 描述2. 解决2.1 递归——DFS(深度优先)2.2 迭代——BFS(广度优先) 1. 描述 Given the roots of two binary trees p and q, write a function to check if they are the same or not. Two binary trees are considered the same if they are stru

2021-11-16 00:33:47 377

原创 【Leetcode】94. Binary Tree Inorder Traversal

https://leetcode-cn.com/problems/binary-tree-inorder-traversal/ 文章目录1. 描述2. 解决2.1 递归2.2 迭代2.3 莫里斯(Morris)遍历 1. 描述 Given the root of a binary tree, return the inorder traversal of its nodes’ values. 2. 解决 2.1 递归 前序遍历:中 - 左 - 右 中序遍历:左 - 中 - 右 后序遍历:左 - 右 - 中

2021-11-15 20:27:41 376

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除