typedef struct node{
int value; //this is the value the node stores
struct node *next; //this is the node the current node points to. this is how the nodes link
}node;
node *append(node *head, int val){
node *tmp = head;
node *createdNode = createNode(val);
while(tmp->next != NULL){
tmp = tmp->next;
}
tmp->next = createdNode;
return head;
}
def insert_at_end(self, data):
new_node = Node(data)
if self.start_node is None:
self.start_node = new_node
return
n = self.start_node
while n.ref is not None:
n= n.ref
n.ref = new_node;