Skip to content

Latest commit

 

History

History
61 lines (29 loc) · 765 Bytes

README_EN.md

File metadata and controls

61 lines (29 loc) · 765 Bytes

中文文档

Description

Given a binary tree, design an algorithm which creates a linked list of all the nodes at each depth (e.g., if you have a tree with depth D, you'll have D linked lists). Return a array containing all the linked lists.

 

Example:

Input: [1,2,3,4,5,null,7,8]



        1

       /  \ 

      2    3

     / \    \ 

    4   5    7

   /

  8



Output: [[1],[2,3],[4,5,7],[8]]

Solutions

Python3

Java

...