SEGMENTATION FAULT

QUESTION LINK:-https://www.geeksforgeeks.org/given-a-sequence-of-words-print-all-anagrams-together-using-stl/
ATTEMPT LINK:-https://ide.geeksforgeeks.org/AHWrZpe0NR

Please explain why I am getting segmentation fault.
Don’t write a new solution, just change my solution or discuss what exactly is wrong with my solution.

Hey @amartyaprabhakar TA support is only for the assigned course. We can’t help for questions that are out of your core module.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.