This is the perfect working code ... but can you give me code in which this question is implemented using list stl.. i have tried but facing issued please help me
Hey Priyanka you can see this code if you are having trouble implementing it using list stl ->
Hope this resolved your doubt.
Remember to mark it as resolved in my doubts
section 
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.