Question 4

Given character a-z find out nth permutation. Where all permutation are only ascending. For e.g

Given characters a,b,c. valid permutations are : a,b,c,aa,ab,ac,bb,bc,cc,aaa,aab,aac,abb,acc,baa,bab,bac,bbb,bbc,bcc,caa,cab,cac,cbb,cbc,ccc

Ex- 4th permutation is : aa

KodNest Training New Batch is starting on 15th July 2020Check Now

New Report

Close