How would you know if there's a loop inside a single-linked list?
Sigiloso
Use two pointers that iterate through the list: one checking one node at a time and one checking every two nodes. If they meet at any moment, it means there's a loop inside the list.