Pregunta de entrevista de iCIMS

(Codility Exam) 1 debugging question, one about tree traversal, one about a basic algorithm (akin to a Leetcode medium/easy)