Meta interview question

Tree question and an array question