aman_012's blog

By aman_012, history, 4 years ago, In English

Hey there!

I came across this problem [](https://www.spoj.com/problems/JNEXT/) under the tag of stack and queues and would like to know the solution for the same. I got it accepted using basic logic but couldn't find any solution using stacks or queues.

Thanks in advance.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

search std::next_permutation on google.