Wrapping Things Up
1
Lecture 40
CS61B, Fall 2024 @ UC Berkeley
Slide Credit: Josh Hug
61B in 12 Minutes or Less
Lecture 40, CS61B, Fall 2024
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Where We Started
Just 14 weeks ago:�
What We’ve Learned about Programming Languages
Example: Programmer only needs to know List API, doesn’t have to know that ArrayList secretly does array resizing.
Example: Array is a sequence of boxes. An array variable is a box containing address of sequences of boxes.
Important Data Structures in Java
Important data structure interfaces:
Concrete implementations of these abstract implementations:
Mathematical Analysis of Data Structure/Algorithm Performance
PQ
List
Set
Map
DisjointSets
Chaining HT
LinkedList
Resizing Array
Heap
Red Black
BST (no balancing)
B-Trees (2-3 / 2-3-4)
Heap
Ordered Linked List
Balanced Tree
Resizing Array
LinkedList
Quick Find
Quick Union
WeightedQuickUnionUF
WQUPC
Some Examples of Implementations for ADTs
Trie
Graph
Adjacency Matrix
Edge List
Adjacency Lists
Arrays vs. Linked Data Structures
Array-Based Data Structures:
Linked Data Structures
Tradeoffs of array-based vs. linked data structures.
Tractable Graph Problems and Algorithms
Reachability
Topological Sort
Multiple Target
Shortest Paths by Total Edge Weight
Single Target Shortest Paths by Total Edge Weight
Multiple Target
Shortest Paths by # of Edges
BFS Traversal
DFS Traversal
Dijkstra’s
A*
Bipartiteness
Cycle Detection
Minimum Spanning Tree
Minimum Spanning Tree
shortest path
shortest paths tree
Prim’s
Kruskal’s
shortest paths tree
vertex markings
vertex ordering
Discussed in section
DAGSPT
Search-By-Key-Identity Data Structures:
Set
2-3 Tree
RedBlack
External Chains
Linear Probing
Map
Searches using compareTo()
Analogous to Comparison-Based
Searches using hashCode() and equals()
Roughly Analogous to Integer Sorting
Comparison Based Sorting Algorithms: Ω(N log N) worst case
Selection
Insertion
Merge
Partition
Counting
LSD
MSD
Counting
Radix Sorting Algorithms: Θ(NW) worst case:
Small-Alphabet (Integer) Sorting Algorithms: Θ(N) worst case
(require a sorting subroutine)
If store in helper BST, eq. to
If heapify first
Heapsort
Trie / TST
Searches by digit. Analogous to Radix Sorting
Fun/Weird Topics (This Week)
Compression:
Compression, Complexity, and P=NP:
The Practice of Programming
Your Future
Lecture 40, CS61B, Fall 2024
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Your Life
Two immediate questions:
Two long-term questions:
Class Poll (Your Answer)
How many students are happy with the grade they are on track to receive?
Class Poll (Your Answer)
What does a good grade in this class mean? How will a good grade in this class affect you?
Class Poll (My Answer)
What does a good grade in this class mean? How will a good grade in this class affect you?
A grade in this course is not a measure of your worth/intelligence.
Several ways your grade could affect your future:
What does your grade mean?
I would argue that the most important thing your grade tells you is how hard your next semester will be.
Most of the time, you don't truly master a concept until you're forced to use it to solve something new. A lot of the concepts we've covered in the last half of the course will only solidify when you start taking 61C, 170, or any other "next step" class.
The grade you get in this course is my message to you saying how difficult I predict it will be to develop that mastery in your next class.
What does your grade mean?
An A in this class is a signifier of mastery. If you take a sequel course, you will likely do well even with other work on your plate. So you can take more/harder courses.
A B in this class is a signifier of comprehension. If you take a sequel course, you will likely do well if you dedicate sufficient time to the class.
A C in this class is a signifier of competence. If you take a sequel course, you will likely need to devote more time than usual to do well. So try to avoid taking too many courses at the same time
Anything below a C is a signifier that you will struggle in a sequel course. Going directly to a sequel course will likely not be worthwhile. It may be good to retake the course so you get more time to digest concepts.
A Supporting Experiment for “Everyone Can Do Well”
In Sp16, Josh gave students the option to fail intentionally to retake the course.
My interpretation: Even if you're not on pace for the grade you want, you have learned a lot from this course. That foundation will make it much easier to relearn the course material at a later time.
Bottom line: You’re capable of achieving more than you might think possible.
The core "goal" of 61B
Ultimately, 61A's main goal was to teach you how to program:
61B's goal is to teach you why you program:
61C and 170 mainly focus on making the code you write efficient (170 by focusing on the theoretical algorithm design, and 61C by focusing on the reality of how a physical computer works).
After that, most classes in the CS major focus on one tiny facet of CS (specialization)
At this point, you have everything you need to build whatever you want from code.
The best way to learn CS from now is to make something by yourself, and to play with code.
How to have fun with CS: Competitive Programming and CTFs (Links in Speaker Notes)
How to have fun with CS: Programming Video Games
How to have fun with CS: Hackathons (https://www.calhacks.io/)
Your Life
Two long-term questions:
Technology will continually to radically reshape the way we live our lives.
Choices (Yup)
How you use your skills is up to you.
Choices (Yup)
How you use your skills is up to you.
Using Your Powers for Good
My request: Use your superpowers in a way that is a net positive for the lives of your fellow humans.
(Wanna talk about this stuff more? Take CS195!)
AMA
Lecture 40, CS61B, Fall 2024
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Questions About Anything for Peyrin and Me?
Course Reflections
Lecture 40, CS61B, Fall 2024
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Feedback Request
We read all of your feedback, especially on the end of course evaluations.
Course evaluations factor heavily into lecturer reviews, and let us know what bits of the class we can improve.
61B Would Love to Have You Next Fall
Special Thanks to the Staff (who keep the wheels on the bus)
Closing Thoughts
It is a terrifying and awesome responsibility to decide how you should spend hundreds of your precious hours here at Berkeley.
Don't worry about how others are doing, or focus on perfectly optimizing your college experience. Chances are, the choices you make now will lead to a good outcome. All you need to do is to be better than the person you were a year ago.
Personally, I teach because I believe that I am doing the most good for the world in this position. Please, prove me right.