hello friends could anybody give me idea how i can find a loop in simple linked list
Jump to Post
If this is the common interview question then you want two iterators, one skipping ahead by a single node each step, and one skipping two nodes. If the two iterators meet before the end of the list, you've found a loop.
If this is not the common interview question, …
All 5 RepliesReply 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.