All Nodes Distance K in Binary Tree — Advanced Trees

Given linked substations and a starting one, list the ids of every substation exactly a requested number of line hops away.

Advanced Trees · Medium

More in Advanced Trees

All algorithm problems