SAP Interview Question

build bt from sorted array