Construct algorithms that use reference mechanisms.


Teaching Note:


Sample Question:


JSR Notes:

This would be how a Node (of a linked list or binary tree) points to another/other Nodes.

So a general algorithms would be something like this:

Node n = new Node();

Node n1 = New Node();

n.setNext = n1;

Node n2 = new Node();

n1.setNext = n2;

See this link for diagrams:

2195   deja vu  Basics of Lists and Trees

And this link for actual code:

2135 code Linked Lists - Generic Node Class & List Class