Bloomberg Interview Question

From an array of numbers, create binary tree. If array has 1, it means next node is a valid node. If it is 0, it is null.