ニュース

Given the root of a binary tree, return the vertical order traversal of its nodes' values. (i.e., from top to bottom, column by column). If two nodes are in the same row and column, the order should ...
バイナリツリーの走査方法の第4弾です。 バイナリツリーについて別で4本記事を書いています。 走査とは先頭から順にデータを見ていくことを指し、バイナリツリーを走査するアルゴリズムは主に4つあります。 Pre-order Traversal In-order Traversal Post-order Traversal Level-order Traversal このうちのLevel-order ...
The vertical order traversal of a binary tree is a list of top-to-bottom orderings for each column index starting from the leftmost column and ending on the rightmost column.