Next Permutation doubt

please tell me what I’m doing wrong in this code

Hey @Rupesh-1984
U forgot to add space while printing ,rest is correct

  for (int x : A){
		cout << x<<" "; //added space
	} 

Please close this thread if u don’t want to ask anything else :slight_smile:

thx you sir…and thread is closed now…

1 Like