Hi all, I have a doubt regarding finding a loop in a linked list.I searched on internet and found 2 different ways of doing the same. But my doubt is that if a linked list has a loop, then wouldn't it be a circular linked list? If yes, then the loop can be found by testing each node's address field with NULL. Am I right? Awaiting a response.
gaurav_13191
0
Junior Poster in Training
Recommended Answers
Jump to PostBut my doubt is that if a linked list has a loop, then wouldn't it be a circular linked list?
Not necessarily. This is a circular linked list:
a -> b -> c -> d -+ ^ | | | +-----------------+
This is a list with a …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.