Pergunta de entrevista da empresa TikTok

Binary tree represented as an array, do binary tree operations