Re: I wrote this programe for circular singly linked list but its not adding nodes to
OK, and what have you done to debug this program? Did you run your program under the debugger to see where it goes wrong?
Did you write this code? If so, then you need to debug this yourself first, then ask questions on what you've discovered in the code that takes the wrong path, variable not set correctly etc.
And even when you discover what is actually wrong, you more than likely would know how to fix it.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; December 14th, 2012 at 01:30 AM.
Re: I wrote this programe for circular singly linked list but its not adding nodes to
When people try to debug linked lists, my advice (along with stepping through with the debugger) is to get pencil and paper out and draw the sequence of node connections you expect to see when a certain action is applied. Step through with the debugger and see if it does the same. In drawing it out step by step you may even discover a fault with the original algorithm you were trying to implement.
Last edited by JohnW@Wessex; December 14th, 2012 at 03:25 AM.
Reason: spelling
"It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong."
Richard P. Feynman
Bookmarks