Endor Labs Interview Question

questions related to trees and graphs