Trying bubble sort and binary search in ruby