BT: vertical order
array: sort an array consiting of 0s and 1s