Countin sort fixed

But malloc alocations added