Pergunta de entrevista da empresa RxLogix Corporation

How to sort an array? 2 or more ways to write code?