modified the non-recursive binary search fxn to return the index of the found element or the negative index if the element were in the array. Used by floorAndCeilOfSortedArray