Kth node from last of linked list


how can we implement this using STL LIST

Hello @bhattanurag426 i think if you want to do it using STL then simply you can use the list header file and then insert the elements in it and then you can check for the kth element from the last using size-k.
i think you can check for size in it directly.
but using STL is never preferred.
your code is perfectly correct and passing all the test cases.

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.