Warning This class is being recorded. At least I think it is.
Approximate overview
Academic
Cultural
Peer
Wellness
Misc
What Java style do you want?
I want you to follow the Google Style Guide.
You need not be perfect.
I really do prefer two-space indentation.
Will I be charged a token for redoing an MP?
See the token policies for details.
If you got an R or an M, there is no charge for the first redo (unless you turn it in late).
If you got an I or did not turn in the mini-project, you must spend one token to turn in the redo (and a second if you turn it in late).
Second redos cost two tokens. If you didn’t turn in the first redo, the second redo stil counts as a second redo.
Can I turn in pre-assessments and post-assessments VERY late.
The original plan was no, but I’ve been slow at getting things done, so perhaps. Let me think about it. Yes.
Why don’t we have grades?
Poor communication with graders. Stay tuned. The redos will open up again.
How do I know how I’m doing with tokens?
Sam will send you a summary tonight or tomorrow.
Today’s repo gives a 404 error.
Not anymore. Thanks for the notification.
There are a variety of ways to implement priority queues. Two basic ones are unsorted arrays and sorted arrays. In a sorted array, get is O(1) but put is O(n). In an unsorted array, get is O(n) but put is O(1). Does it really make a difference?
Suppose our program adds n items and then only gets one. In practice, the unsorted array is going to be better because we only do the expensive operation a few times.
But yes, both will be O(n^2) if we add and remove n elements.
There are some algorithms that choose unsorted arrays for this reason.
Of course, there are other implementations of priority queues that have better O() running times. We’ll learn one later this semester.
Intuition: When we want to make things faster and we are going for O(logn), use a balanced binary tree.
We’ve currently analyzed merge sort in two ways:
The trees are a bit more straightforward.
Note: Doing a few basic patterns and then remembering them is a good strategy.
It’s time to explore the wonder of lambdas. (Lab-mdas?)
I apologize for the gender binary in the Person class.