Illustration

Given a tree, prune it to select for only a certain node color

Given that a tree is made of only red or black nodes, return another tree that only has the paths of the original tree leading to a red node.


Problem Statement

Given that a tree is made of only red or black nodes, return another tree that only has the paths of the original tree leading to a red node.


References

Ankur from Google

Amin A.

Written by

Amin Ariana

A software entrepreneur from San Francisco