摘要: N-ary Tree Preorder Traversal Given the root of an n-ary tree, return the preorder traversal of its nodes' values. Nary-Tree input serialization is re 阅读全文
posted @ 2023-01-30 22:17 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要: N-ary Tree postorder Traversal Given the root of an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is 阅读全文
posted @ 2023-01-30 22:17 iyiluo 阅读(24) 评论(0) 推荐(0)
摘要: Construct String from Binary Tree Given the root of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with t 阅读全文
posted @ 2023-01-30 22:17 iyiluo 阅读(30) 评论(0) 推荐(0)
摘要: Merge Two Binary Trees You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two 阅读全文
posted @ 2023-01-30 22:17 iyiluo 阅读(19) 评论(0) 推荐(0)
摘要: Average of Levels in Binary Tree Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. Answers 阅读全文
posted @ 2023-01-30 22:16 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Implement Queue using Stacks Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions 阅读全文
posted @ 2023-01-30 22:16 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Two Sum IV - Input is a BST Given the root of a binary search tree and an integer k, return true if there exist two elements in the BST such that thei 阅读全文
posted @ 2023-01-30 22:16 iyiluo 阅读(27) 评论(0) 推荐(0)
摘要: Image Smoother An image smoother is a filter of the size 3 x 3 that can be applied to each cell of an image by rounding down the average of the cell a 阅读全文
posted @ 2023-01-30 22:15 iyiluo 阅读(21) 评论(0) 推荐(0)
摘要: Second Minimum Node In a Binary Tree Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tr 阅读全文
posted @ 2023-01-30 22:15 iyiluo 阅读(26) 评论(0) 推荐(0)
摘要: Search in a Binary Search Tree You are given the root of a binary search tree (BST) and an integer val. Find the node in the BST that the node's value 阅读全文
posted @ 2023-01-30 22:14 iyiluo 阅读(18) 评论(0) 推荐(0)