← Paytm questions
CodingReported in a candidate post, Jul 2025

Second last node and kth node from the end in one pass

Filed under Paytm

Find the second-last node of a singly linked list in a single traversal, then generalise: return the value of the k-th node from the end in one pass. The second-last node is the case k = 2.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Paytm questions

Collected from public candidate posts and coding forums. Updated Nov 2026.