The two-pass length-then-delete solution works, but the interview wants a single pass: a gap of N between two pointers, plus a dummy head that makes deleting the real head fall out for free. Here is the clean answer.
Unlock the other 750 answers · ₹2,000 / $25Your progress and mastery stay saved · 6 months · one payment · no auto-renew
