This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
haas:fall2017:data:projects:sln0 [2017/08/27 17:07] – [A node] wedge | haas:fall2017:data:projects:sln0 [2017/08/29 12:44] (current) – [Objective] wedge | ||
---|---|---|---|
Line 16: | Line 16: | ||
In this project, we start conceptualizing aspects of the program we wrote in last week's project (with the arrays), and start looking at each unit of information as an arbitrary **node** unit, connected to its immediate proceeding neighbor via a **link**. | In this project, we start conceptualizing aspects of the program we wrote in last week's project (with the arrays), and start looking at each unit of information as an arbitrary **node** unit, connected to its immediate proceeding neighbor via a **link**. | ||
- | This gets us into a central theme of the course which we'll be running with from now until the end- the idea of a linked nodes, or in our current case: singly-linked nodes. | + | This gets us into a central theme of the course which we'll be running with from now until the end- the idea of linked nodes, or in our current case: singly-linked nodes. |
=====Overview===== | =====Overview===== | ||
Line 139: | Line 139: | ||
The longer you hold out and resist from drawing pictures, the longer a lot of this may be difficult or frustrating. | The longer you hold out and resist from drawing pictures, the longer a lot of this may be difficult or frustrating. | ||
====Creating a node==== | ====Creating a node==== | ||
- | To create a node, in pseudo-code, | + | To create a node, in pseudo-code, |
**mknode()** returns the location of this new node, so in order to prevent it from getting lost, we need to assign a variable to it (much as our start, tmp, tmp2, tmp3 variables do). | **mknode()** returns the location of this new node, so in order to prevent it from getting lost, we need to assign a variable to it (much as our start, tmp, tmp2, tmp3 variables do). |