Implemented Insertion sort on a string