Topic List | Page List: 1 |
---|---|
Topic | I know what a Linked List is |
Questionmarktarius 12/11/22 5:29:01 PM #34: | [LFAQs-redacted-quote] There's not a lot of easy ways to find a loop that loops several nodes back. If you can't mess with the class itself for a sentinel, clone the entire list. Then iterate the clone while unsetting prior nodes. When you ht a null pointer, you've either found a loop or some other serious problem with the list. ... Copied to Clipboard! |
Topic List | Page List: 1 |