Added methods isBinary and insertSortedArray