Snap interview question

Build a binary tree from array