array can be sorted in two forms as ascending and descending. But to sort array in these 2 form there are different technique used like sorting algorithms, bit manipulation, etc.