Can we do it by first finding the tail then traversing back till k times ??
Linked List Kth Node from Last
By finding reverse then traversing to kth node??
which method will cost less time complexity??
@ashwani225 I think the time complexity will be the same for both cases but the method given in video is more efficient because less steps are involved. You can try coding both of them for practicea and use the one you are more comfortable with.
@ashwani225 the code seems to be working for multiple inputs, if you want to be absolutely sure you can try submitting it in a challenge or derive a mathematical proof.