A Binary Tree can be converted to an Array with the following formulas to find index: