Oracle Interview Question

Optimise code to O(1) complexity.Sorting algorithms