Solve tree leaf sum and target indices search | Meta