Amazon Interview Question

Sorting and acessing elements in a large array (millions of elements)