I am not able to print the result lexicographically. Please help me out

My code = https://ide.codingblocks.com/s/665776

hi @ayushkotwar2002_78a27ac2b05189a5 https://ide.codingblocks.com/s/665796 updated

Sir i haven’t studied vectors yet. could you help me out with a simple way?

hi @ayushkotwar2002_78a27ac2b05189a5, u can do same with arrays

  1. store
  2. sort
  3. print
  4. clear for new test case