Announcements
Your job from now until the final: Study a little each day.
Bonus lecture now requires 2 goodies and not 4.
Wrapping Things Up
2
Lecture 40
CS61B, Spring 2023 @ UC Berkeley
Josh Hug and Justin Yokota
61B in 12 Minutes or Less
Lecture 40, CS61B, Spring 2023
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, Spring 2023
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Your Life
Two interesting questions:
Some Josh Hug History
Slacker/punk rock attitude result
Midterm 1
Poll: yellkey.com/unit
To what degree do you believe the following statement: Nearly anybody enrolled at Berkeley could achieve an A in CS61B.
Bloom’s Two Sigma Problem
Bloom’s Two Sigma Problem: In one experiment, student randomly picked for 1-on-1 teaching performed similarly to the top 2% of a simultaneous lecture course.
Bloom’s Two Sigma Problem
Bloom’s Two Sigma Problem: In one experiment, student randomly picked for 1-on-1 teaching performed similarly to the top 2% of a simultaneous lecture course.
2σ
7661.43
Top 2%
7216.70
61A/88 Grade vs. 61B Grade
From “Analysis of Factors and Interventions Relating to Student Performance in CS1 and CS2” by my former grad student:
A Supporting Experiment for “Everyone Can Do Well”
In Sp16, I gave students the option to fail intentionally.
My interpretation: There exists some sort of preparation for 61B that helps students do much better.
Bottom line: You’re capable of achieving more than you might think possible.
Your Life
Two interesting 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, Spring 2023
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Questions About Anything for Justin and Me?
Course Reflections
Lecture 40, CS61B, Spring 2023
61B in 12 Minutes or Less
Your Future
AMA
Course Reflections
Some Old 61B History (black line is Fa18 61A): Tuning 61B’s Difficulty and Quality
*
* is a josh semester
*
*
*
*
*
*
*
*
*
Feedback Request
We read all of your feedback, especially on the end of course evaluations.
I’m particularly curious about:
Things For Next Time
Major possibilities:
Feel free to suggest other changes!
61B Would Love to Have You Next Fall
Special Thanks to Our Academic Interns (who keep the wheels on the bus)
Academic Interns: Aditya Murali Iyer, Aditya Rao, Afreen Shah, Aidan Gregory Leung, Aim Poonsornsiri, Alexander Huizar, Anahit Hovsepyan, Andrew Caslow, Audrey Burnett, Avik Samanta, Basem Moustafa, Boen Fan, Buyankhuu Tsolmonkhuu, Caleb Y Ro, Cambridge Bui-Nguyen, Catherine Chu, Diego Alejandro Huezo, Dongho Tommy Kim, Dora Du, Dylan Love, Elise Estela Rodriquez, Ella Culleton, Emma Wu, Farzan Ahmad Hashmi, Felix Zhu, Fiona Wu, Garrett Moore, Grant Zhao, Hanqi Xiong, Hongbo Wei, Isaiah Ou, Jackie Dai, Jacob Taegon Kim, Jacqueline Thibault, Japinder Singh Narula, Jeremy Villanueva, John Teng, Josh Barua, Julian Bixler, Karson Du, Keshav Raj Singhal, Khankamol Chor Kongrukgreatiyos, Kunal Agrawal, Martin M Lacsamana, Mateus Mori Ikezaki, Melody Law, Mohammad Shahnawaz, Mukhamediyar Kudaikulov, Mustafa Omar Mirza, Naomi Liu, Naveen Nathan, Nithurhan Carthikeyan, Noah Yin, Owen Gozali, Peter Le, Ryan James Whitty, Ryan Yang, Sai Kolasani, Sara Tetsu, Shreya Gupta, Sophia Zheng, Srilakshmi Chavali, Srinidhi Raghavendran, Steffi Bing Lin, Stephen Hwang, Stone Wu, Sushanth Sathish Kumar, Vincent Lin, Zehan Ma
Special Thanks to the Staff (who keep the wheels on the bus)
20 Hour/wk GSIs: Allen Gu, Jedidiah Tsang, Shreyas Kompalli, Sreevidya Ganga, Alex Schedel, Angelina Songco, Anish Bajaj, Anton Zabreyko, Aram Kazorian, Crystal Wang, Dominic Conricode, Edward Park, Ergun Acikoz, Eric Che, Lucy Lu, Meshan Khosla, Noah Adhikari, Sherry Fan
8 Hour/wk GSIs: Adit Shah, Alexander Lew, Ali Khani, Austin George, Circle Chen, Dhruti Pandya, Dylan Hamuy, Elana Ho, Elisa Kim, Emily Su, Hailey Park, Jasmine Lin, Jennifer Prince, Kenneth Wang, Kyle Zhang, Laksith Prabu, Max Ye, Omar Yu, Royce Ren, Sahityasree Subramanian, Samuel Berkun, Shirley Chen, Shreyas Kallingal, Stella Kaval, Yaofu Zuo
8 Hour/wk tutors: Aarin Salot, Aleem Lakdawala, Alexander Ng, Allen Cao, Allison hong, Angel Aldaco, Ashley Kao, Ashley Ye, Ayati Sharma, Carl Ji, Claire Thibodeaux, David Yang, Deepak Ragu, Dhruv Ahuja, Erik Kizior, Erik Nelson, Eshaan Moorjani, Ethan Lo, Ian Li, Janani Sriram, Jay Chou, Julian Tuazon, Kevin Sheng, Kevin Xu, Lawrence Shieh, Teresa Luo, Michael Wu, Mihir Mirchandani, Nadia Latifi, Nathalys Pham, Nicholas Nguyen, Olivia Huang, Pradyun Kumar, Ronald Wang, Sophie Nazarian, Surbhi Jain, Tanya Mehta, Taylor Hodan, Thomas Lee, Vanessa Teo, Vika Stukalova, Vikram Kumar, William Lee, Xifeng Li
Closing Thoughts
It is a terrifying and awesome responsibility to decide how you should spend hundreds of your precious hours here at Berkeley.
I do this job because I want you to live more fulfilling lives.
I hope I’ve done a good job. I know it wasn’t perfect (and sadly never will be).
… and thanks for all the kind words, feedback, and understanding when things are not as good as they could be.