what does the init function in circular list, what should that do.
should it create a ciruclar list with the solider's already in it. OR should it be empty and I append the soliders in the main function definition.
I think i will have the list initialized to none and then have only one attribute which is the pointer to the first node "think self.first=None" then pass an argument
do I need any other attributes?
what happens when i assign a variable an object and then do:
while variable != none
i mean wouldn't python get confused because it does not know which attribute you are referring to (confused between variable.data and variable.next ???)
im having a problem with traversing a circular linked list
I can't seem to find an implementation that completes the last link before the jump to the new link while starting with the first link. because when i do then i can't start
starting from one and stopping when you reach back to one are very different prcesses
you basically need a .next that is not attached to a node that will be traversed otherwise it will kill the operation and that node will not be visited
No comments:
Post a Comment