BITSILICA interview question

Arrange the array elements in ascending and descending oreders