読者です 読者をやめる 読者になる 読者になる

Cracking The Coding Interview Binary Tree LinkedList

Problem

leetcode.com

Solution

This problem can be solve by DFS with depth of tree. In my code, lists.size() == depth means that the traversing depth changes.

Source Code