Many of the Linked List methods, such as size(), would run forever if invoked on a Linked List like the one in Figure 6–32. Write code to produce such a list. Devise and implement a method is Cyclic() which returns true if the Linked List on which it is invoked has this problem. (Hint: If two cross-country runners start off down a course at different speeds, will the faster runner eventually “lap” the slower one if the course is cyclic?)
Figure 6–32
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here