3 ms·
Determine if a linked list is a loop or not. There are a few small tricks. Something that you can get in an interview even if you have never seen it before.
by startupdiscuss 10y ago
Determine if a linked list is a loop or not.
There are a few small tricks. Something that you can get in an interview even if you have never seen it before.
- MichaelGG 10y agoTo start: "given two liked lists, determine if they share any nodes". Even if you've only read about linked lists it should be something to get in a few minutes by stepping through it. No tricks.