C # program to implement above approach
using System ; using System . Collections . Generic ; class GFG { public static int sortString ( string S ) { List < int > sorted = new List < int > ( ) ; List < int > original = new List < int > ( ) ; bool insert = false ;