[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[On Teaching and Learning]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.5 API]
[Espresso]
[TAO of Java]
[CS152 2004F]
Back to Linked Lists. On to An Introduction to Sorting.
Held: Friday, April 29, 2005
Summary: Today we discuss important issues from exam 2.
Related Pages:
Overview:
Some of you didn't seem to understand how the initial solution worked, so here's another try.
How do we keep track of the number of steps?
fewestCoins is called.
long steps;
...
public int fewestCoins(int price)
{
++steps;
...
} // fewestCoins(int)
resetSteps and getSteps.
The "use an array" part was intended to be the challenging part of the problem, but also to help you learn an important point.
LinearStructure and make a few changes.
peek to behave correctly.
java.math.Random.
ints to Objects, you just had to make a few changes.
Comparator<Object,Object> to the constructor.
int appeared, use Object (or Comparable)
< appeared, use the compare method of the comparator.
Back to Linked Lists. On to An Introduction to Sorting.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[On Teaching and Learning]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.5 API]
[Espresso]
[TAO of Java]
[CS152 2004F]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed May 11 10:56:16 2005.
The source to the document was last modified on Mon Jan 24 10:17:08 2005.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2005S/Outlines/outline.48.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby