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 754 answers · ₹2,000 / $25includes both full courses · progress stays saved · 6 months · one payment · no auto-renew
