Please tell me how to do this one?
Please tell me how to do this one?
the problem is that when there is only 1 element left in the list, you do pop front and pop back which causes RUN ERROR, so you need to check if elements are present in the list before pop back
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.