Pocket Gems interview question

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