Metamidout. de 2025
Sem observação adicional neste relato público.
Given a binary tree, find the length (number of edges) of the longest path whose nodes all share the same value, where the path may lie anywhere in the tree. This is solved by a DFS that for each node computes the longest same-valued descending path into its children and combines left/right contributions to update the global maximum.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Sem observação adicional neste relato público.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.