sorted array with respect to any other number
order of sorting number not neccessary adjucent