Next permutation approach daught

can anyone please explain how to approach this question using stl

using stl
simply use next_permutation() function

for this function details see doucumentation

next_permutation() Documentation

https://ide.codingblocks.com/s/314729- like this ? but failing all test

why you are printing only 3 values not the whole vector???

correct ways is shown below

like this

if you want to ask something about this feel free to ask
i hope this helps
if yes show your response with :heart: and don’t forgot to mark doubt as resolved