Citrus Pay Interview Question

DS, mostly trees and lists with problem solving