Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
For algorithms, in python, define a simple Node class to represent a simple node, which can hold some data and end up as part of a linked stucture (e.g. linked list)
Answer
class Node(object):
    def __init__(self, data):
        self.data = data
        self.next = None
^^ note that we are initially setting the next pointer to None (self.next = None) as easy way to properly terminate the linked list that will be made using these Node objects

Question
For algorithms, in python, define a simple Node class to represent a simple node, which can hold some data and end up as part of a linked stucture (e.g. linked list)
Answer
?

Question
For algorithms, in python, define a simple Node class to represent a simple node, which can hold some data and end up as part of a linked stucture (e.g. linked list)
Answer
class Node(object):
    def __init__(self, data):
        self.data = data
        self.next = None
^^ note that we are initially setting the next pointer to None (self.next = None) as easy way to properly terminate the linked list that will be made using these Node objects
If you want to change selection, open document below and click on "Move attachment"

pdf

owner: kkhosravi - (no access) - PYTHON_DATA_STRUCTURES_AND_ALGORITHMS.pdf, p105

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.