文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战297:二叉树的序列化与反序列化

今天和大家聊的问题叫做 二叉树的序列化与反序列化,我们先来看题面:https://leetcode-cn.com/problems/serialize-and-deserialize-binary-tree/Serialization is the process of converting a data structure or object into a sequence of bits s....

​LeetCode刷题实战297:二叉树的序列化与反序列化
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战236:二叉树的最近公共祖先

今天和大家聊的问题叫做 二叉树的最近公共祖先,我们先来看题面:https://leetcode-cn.com/problems/lowest-common-ancestor-of-a-binary-tree/Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.给定一个二....

​LeetCode刷题实战236:二叉树的最近公共祖先
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战226:翻转二叉树

今天和大家聊的问题叫做 翻转二叉树,我们先来看题面:https://leetcode-cn.com/problems/invert-binary-tree/Given the root of a binary tree, invert the tree, and return its root.翻转一棵二叉树。示例解题递归解决这是一道很经典的二叉树问题。显然,我们从根节点开始,递归地对树进行遍历....

​LeetCode刷题实战226:翻转二叉树
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战145:二叉树的后序遍历

今天和大家聊的问题叫做 二叉树的后序遍历,我们先来看题面:https://leetcode-cn.com/problems/binary-tree-postorder-traversal/Given the root of a binary tree, return the postorder traversal of its nodes' values.题意给定一个二叉树,返回它的 后序 遍历....

​LeetCode刷题实战145:二叉树的后序遍历
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战144:二叉树的前序遍历

今天和大家聊的问题叫做 二叉树的前序遍历,我们先来看题面:https://leetcode-cn.com/problems/binary-tree-preorder-traversal/Given the root of a binary tree, return the preorder traversal of its nodes' values.题意给你二叉树的根节点 root ,返回它节....

​LeetCode刷题实战144:二叉树的前序遍历
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战124:二叉树中的最大路径和

今天和大家聊的问题叫做 二叉树中的最大路径和,我们先来看题面:https://leetcode-cn.com/problems/binary-tree-maximum-path-sum/Given a non-empty binary tree, find the maximum path sum.For this problem, a path is defined as any node s....

​LeetCode刷题实战124:二叉树中的最大路径和
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战103:二叉树的锯齿形层次遍历

今天和大家聊的问题叫做 二叉树的锯齿形层次遍历,我们先来看题面:https://leetcode-cn.com/problems/binary-tree-zigzag-level-order-traversal/Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from ....

​LeetCode刷题实战103:二叉树的锯齿形层次遍历

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

算法编程

开发者社区在线编程频道官方技术圈。包含算法资源更新,周赛动态,每日一题互动。

+关注