add functionality to array util and binary search for rotated arrays