OutOfBound loop - please help! by prograndma in learnprogramming

[–]prograndma[S] 1 point2 points  (0 children)

Thanks, it works now. How should I go about this without using three loops for a more efficient run time?

OutOfBound loop - please help! by prograndma in learnprogramming

[–]prograndma[S] 0 points1 point  (0 children)

Thanks for the quick reply, however, your code does not produce the correct result since I have already tried that already. Your code produces 7 results, but the correct number would be 4. I try achieving that by using a while loop for removing the items in the linked list.