leetcode讲解--515. Find Largest Value in Each Tree Row

2019-01-07
阅读 2 分钟
1.6k
题目 You need to find the largest value in each row of a binary tree. Example: {代码...} 讲解 又是树的层次遍历题。相同的题我已经做了两个了:637. Average of Levels in Binary Tree、429. N-ary Tree Level Order Traversal Java代码 {代码...}

leetcode讲解--637. Average of Levels in Binary Tree

2019-01-03
阅读 2 分钟
2.1k
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array.

leetcode讲解--429. N-ary Tree Level Order Traversal

2019-01-02
阅读 2 分钟
2.5k
Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).

leetcode讲解--841. Keys and Rooms

2019-01-02
阅读 2 分钟
1.6k
There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next room.