Implementation of basic Sorting Codes