Академический Документы
Профессиональный Документы
Культура Документы
:
Algorithmic Thinking
1-3
1. Input specified
Data to be transformed during the computation to
produce the output
Must specify type (numeric, string, fraction), amount,
and form of data
2. Output specified
Data resulting from the computationintended
result
It is possible to have no output
1-4
4. Effectiveness
The operations are doable
5. Finiteness
Must eventually stop
1-5
1-8
1-11
1-12
1-13
1-14
1-15
1-17
1-19
In general, might have many more than 26 characters (upper lower case,
hyphens, apostrophe). Picking up all the stacks starts to affect timing.
1-23
Clearly this is better than a regular insertion sort as the piles are so much
smaller.
First step is 100 operations. Second step is 26*(4*5/2) = 260 !!!
1-25
1-26
1-27
1-28
1-29
1-30
1-31
1-32
Sorting, recursively
Finding the student with the highest GPA,
recursively
1-38
1-39
1-40