Showing segmentation fault in coding blocks ide


its running perfectly fine by other compilers but coding blocks ide is showing segmentation fault . can you please check.

the code is not working in vs code as well


this piece of code is causing a problem

hmm…but we can’t use the linked list way of changing the pointer to node ourself that we were using because we can’t access a particular node therefore we used stl. right?

nhi stl has not provided a provision to update link like we do it when we create a user defined classs

and also 1 suggestion if u are asked in the interview the method u adopted will be considered inefficient since u use extra space

can we do this question by user defined class?

yeah i know i took extra space for it but how cna we make it more efficient…and if we want efficiency then we should not use stl…right?

yes do it using user defined class

algo is at the bottom code is well commented
this is the standard way of doing it

if any issue read gfg solution for this question

hii i have made a code can you please check what the problem is? Moreover i have not still made the delete function in my code on which i am working can you please check till now

i have responded to the other doubt !

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.