Cyient interview question

Sorting and searching programs in any language.