1523

 

12335

Problem Solving Head start: Discussion is quoted from this link: So before proceed recall,if a<b<c<d and string is- abcd, there are 24 permutation,where 1-6 permutation start with smallest, here a. 7-12 permutation start with second smallest, here b. 13-18 permutation start with third smallest, here c. 19-24 permutation start with fourth smallest, here d. lets