This week's lab is a bit of a potpourri of topics
...
:
- Quicksort Algorithm
- Variable Argument Lists
- Two Visitor Styles
- Binary Search Algorithm
- Insertion into a Doubly-linked list
Anchor | ||||
---|---|---|---|---|
|
Quicksort is the most common sorting algorithm in use today. In light of its technological impact, it's good to know how it works.
...
===================================================================================================================
Anchor | ||||
---|---|---|---|---|
|
We discussed this before in lab and lecture, but it's worth revisiting to make sure everyone understands it.
...
===================================================================================================================
Anchor | ||||
---|---|---|---|---|
|
You were shown two different styles of writing visitors, with and without input parameters. Why two different techniques?
...
===================================================================================================================
Anchor | ||||
---|---|---|---|---|
|
The recursive technique used to find a value in a sorted array is very useful in many situations.
...
===================================================================================================================
Anchor | ||||
---|---|---|---|---|
|
Inserting a node into a doubly-linked list, ala BiList
, isn't difficult, but it does take care to make sure that one has the right values for the node references at any given moment. Here's a pictoral explanation of the process:
...