Core dumped error

/bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe

i am facing this problem with duplicate values only

hello @raghavthecoder
pls save ur code here -> https://ide.codingblocks.com/
and share the link with me


here when stack is empty then in that case.

answer should be i+1 and not -1.
so make these changes at highlighted place and then try

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.