Sort Algorithm with linear complexity