Metafic interview question

Simple DSA questions about trees, graphs