Pergunta de entrevista da empresa Wish

Asked about binary trees and graphs