Pregunta de entrevista de Amazon

TopK Frequent elements, Maximum path sum in a tree