Module Quiz
Complete this quiz after finishing the concept and practice pages.
Question 1: Binary Search Validity
What condition must be true before binary search is a valid move?
Answer: The data must already be sorted by the same ordering you plan to search against. Without sorted order, halving the space is unjustified.
Question 2: Big O
What does Big O describe in plain language?
Answer: It describes how the work or memory grows as the input grows. It is about scaling behavior, not exact stopwatch time for one run.
Question 3: Data Tradeoff
Why can an array feel fast for reads but awkward for middle insertions?
Answer: Indexed reads are direct, but inserting in the middle often requires shifting many later elements to open space.
Question 4: Hash Tables
Why is a hash table fast on average but not magic?
Answer: A good hash function spreads keys so lookup usually reaches the right bucket quickly, but collisions still exist and can slow the work down.
Question 5: Recursion
What are the two parts every recursive function needs?
Answer: A base case that stops the recursion and a recursive case that moves toward a smaller or simpler version of the same problem.
Question 6: Call Stack
What is the call stack doing during recursion?
Answer: It holds the unfinished work from each call so execution can return in reverse order once the base case is reached.
Question 7: Sorting Shape
What is the structural difference between selection sort and quicksort?
Answer: Selection sort repeatedly scans for the next smallest item, while quicksort partitions the data around a pivot and solves smaller subproblems recursively.
Question 8: Pivot Role
What job does the pivot perform in quicksort?
Answer: It separates values into groups relative to the pivot so the algorithm can sort the smaller partitions independently.
Question 9: Graph Thinking
Why does breadth-first search need a queue?
Answer: The queue preserves first-in, first-out order so nodes are explored layer by layer, which is what gives BFS its shortest-unweighted-path behavior.
Question 10: Applied Judgment
You need the fewest clicks between two connected pages in a small site map. What model and search should you try first?
Answer: Model the pages as a graph and try breadth-first search, because the goal is the shortest path in an unweighted connection map.
Self-Assessment
- 90%+ correct: ready to carry this intuition into Module 2
- 70-89% correct: revisit the weak concept pages and redo one practice page
- <70% correct: retrace one search example, one recursion example, and one graph example by hand before moving on
Readiness Check
- I can explain why sorted order matters for binary search
- I can compare growth classes without talking only about clock time
- I can choose a data shape by operation, not by buzzword
- I can identify both the base case and recursive case
- I can explain why BFS uses a queue and a visited rule