summaryrefslogtreecommitdiff
path: root/doc/unit/03
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-06-28 16:03:56 -0600
committermo khan <mo.khan@gmail.com>2020-06-28 16:03:56 -0600
commitc709b2bad0f9b6ce3a26cc23c88ba4bca7ab0f6d (patch)
tree14c7402846f7eae4fb3563ebf7441fb5387d54c7 /doc/unit/03
parentb666decae0dbdc7716df52f8d4cdf21b3144b565 (diff)
Fix makefile
Diffstat (limited to 'doc/unit/03')
-rw-r--r--doc/unit/03/README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/doc/unit/03/README.md b/doc/unit/03/README.md
new file mode 100644
index 0000000..91b31ee
--- /dev/null
+++ b/doc/unit/03/README.md
@@ -0,0 +1,39 @@
+# Study Activities
+
+Study the following sections from Pat Morin’s textbook:
+
+1. SLList: A Singly-Linked List
+2. DLList: A Doubly-Linked List
+3. SEList: A Space-Efficient Linked List
+
+Go to Data Structure Visualizations at http://www.cs.usfca.edu/~galles/visualization/Algorithms.html, and try the following:
+
+* Stack: Linked List Implementation
+* Queues: Linked List Implementation
+* Lists: Array Implementation (available in Java version)
+* Lists: Linked List Implementation (available in Java version)
+
+# Linked Lists
+
+Have advantages and disadvantages over array based List interface.
+
+Advantage
+
+* more dynamic
+
+Disadvantage:
+
+* using `get(i)` or `set(i, x)` in constant time.
+
+## Singly-Linked List
+
+SLList: is a sequence of Nodes with a reference to a value and the next node.
+
+```java
+class Node {
+ T x;
+ Node next;
+}
+```
+
+For efficiency the variables `head` and `tail` are used to keep track of the first and last node.