I'm practising Python and I couldn't think of any solution to this problem.
The problem is to remove kth last element from a singly linked list in just one pass and constant space.
I can only think of a solution that requires 2 passes.
Also, in the question, the size of the list was not mentioned, so I'm assuming the size is known apriori.
Can anyone show me a way to do it in a single pass, please?