Node (computer Science) - Pseudocode Implementation Examples

Pseudocode Implementation Examples

A node containing a single node reference field.

record SinglyLinkedNode { next, // A reference to the next node data // Data or reference to data }

Here, three such nodes form a singly linked list of length 3:


A node containing two node reference fields.

record DoublyLinkedNode { previous, // A reference to the previous node next, // A reference to the next node data // Data or reference to data }

Here three such nodes form a doubly linked list of length 3:


Also common is a binary tree node containing references to left and right child nodes, and a reference to a parent node.

record BinaryNode { parent, // A reference to the parent node left_child, // A reference to the left child node right_child, // A reference to the right child node data // Data or reference to data }

Read more about this topic:  Node (computer Science)

Famous quotes containing the word examples:

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)