上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 77 下一页
摘要: Given the root of an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order 阅读全文
posted @ 2021-07-12 01:28 苗妙苗 阅读(26) 评论(0) 推荐(0) 编辑
摘要: Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest le 阅读全文
posted @ 2021-07-12 00:19 苗妙苗 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, return the preorder traversal of its nodes' values. Example 1: Input: root = [1,null,2,3] Output: [1,2,3] Example 2: 阅读全文
posted @ 2021-07-11 10:01 苗妙苗 阅读(39) 评论(0) 推荐(0) 编辑
摘要: Given the root of a binary tree, determine if it is a valid binary search tree (BST). A valid BST is defined as follows: The left subtree of a node co 阅读全文
posted @ 2021-07-11 09:14 苗妙苗 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 基础的三个模板:traverse, dc, bst 【traverse模板】 题:700. Search in a Binary Search Tree 在bst中返回目标所在的最小子树 class Solution { public TreeNode searchBST(TreeNode root 阅读全文
posted @ 2021-07-10 04:17 苗妙苗 阅读(93) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2021-07-08 01:25 苗妙苗 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tree is d 阅读全文
posted @ 2021-07-08 00:18 苗妙苗 阅读(29) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2021-07-07 09:29 苗妙苗 阅读(34) 评论(0) 推荐(0) 编辑
摘要: tech sells,说话的岗位在费城,用js问了安卓项目, ds web项目api sdk 区别 阅读全文
posted @ 2021-07-07 08:44 苗妙苗 阅读(44) 评论(0) 推荐(0) 编辑
摘要: [抄题]: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others 阅读全文
posted @ 2021-07-07 02:28 苗妙苗 阅读(30) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 77 下一页