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

​LeetCode刷题实战513:找树左下角的值

今天和大家聊的问题叫做 找树左下角的值,我们先来看题面:https://leetcode-cn.com/problems/find-bottom-left-tree-value/Given the root of a binary tree, return the leftmost value in the last row of the tree.给定一个二叉树的 根节点root,请找出该二叉....

​LeetCode刷题实战513:找树左下角的值
文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战508:出现次数最多的子树元素和

今天和大家聊的问题叫做 出现次数最多的子树元素和,我们先来看题面:https://leetcode-cn.com/problems/most-frequent-subtree-sum/Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the va....

​LeetCode刷题实战508:出现次数最多的子树元素和
文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战429:N 叉树的层序遍历

今天和大家聊的问题叫做 序列化和反序列化 N 叉树,我们先来看题面:https://leetcode-cn.com/problems/n-ary-tree-level-order-traversal/Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input seriali....

​LeetCode刷题实战429:N 叉树的层序遍历
文章 2022-02-16 来自:开发者社区

​LeetCode刷题实战333:最大 BST 子树

今天和大家聊的问题叫做 最大 BST 子树,我们先来看题面:https://leetcode-cn.com/problems/largest-bst-subtree/Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with ....

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

​LeetCode刷题实战310:最小高度树

今天和大家聊的问题叫做 最小高度树,我们先来看题面:https://leetcode-cn.com/problems/minimum-height-trees/A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connecte....

​LeetCode刷题实战310:最小高度树
文章 2022-02-15 来自:开发者社区

​LeetCode刷题实战250:统计同值子树

今天和大家聊的问题叫做 统计同值子树,我们先来看题面:https://leetcode-cn.com/problems/count-univalue-subtrees/Given a binary tree, count the number of uni-value subtrees.A Uni-value subtree means all nodes of the subtree have....

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

​LeetCode刷题实战100:相同的树

今天和大家聊的问题叫做 相同的树,我们先来看题面:https://leetcode-cn.com/problems/same-tree/Given two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are ....

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

算法编程

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

+关注