Pregunta de entrevista de Meta

First round coding problem is about tree and second is about dot product.