full-course.json
json Container
READ_ONLY_ACCESS[ { "id": "ct-w01-000", "front": "Week 1 Diagnostic: In computational thinking, what is the purpose of initializing a variable before entering a loop?", "back": "Answer: B — Initialization gives a variable a well-defined starting value (such as count = 0 or max_val = -inf) so subsequent operations update a reliable baseline." }, { "id": "ct-w01-001", "front": "Week 1 Diagnostic: In a flowchart, what geometric shape is standard for a decision condition (e.g. checking if X > 0)?", "back": "Answer: C — In standard flowcharts, a Diamond represents a branching decision point with two or more outgoing branches (e.g. Yes/No)." }, { "id": "ct-w02-000", "front": "Week 2 Diagnostic: To find the maximum score in a dataset using a single pass, how should the accumulator variable `max_so_far` be initialized?", "back": "Answer: A — To find a maximum, initialize `max_so_far` to the lowest possible value so any real element can replace it on first comparison." }, { "id": "ct-w02-001", "front": "Week 2 Diagnostic: If condition A is True and condition B is False, what does (A and B) evaluate to?", "back": "Answer: B — The logical AND operator requires both operands to be True. If either is False, the result is False." }, { "id": "ct-w03-000", "front": "Week 3 Diagnostic: What is the primary difference between a pure procedure and a procedure with side effects?", "back": "Answer: B — A side effect occurs when a procedure modifies external state, writes to a file, or updates a global structure beyond returning a local value." }, { "id": "ct-w03-001", "front": "Week 3 Diagnostic: If condition A is True and condition B is False, what does (A or B) evaluate to?", "back": "Answer: A — The logical OR operator evaluates to True if at least one operand is True." }, { "id": "ct-w04-000", "front": "Week 4 Diagnostic: If an outer loop runs N times and an inner loop runs N times for each outer iteration, what is the total number of inner loop executions?", "back": "Answer: B — Nested iterations multiply execution counts: N * N = N^2." }, { "id": "ct-w04-001", "front": "Week 4 Diagnostic: In the Birthday Paradox, approximately how many people are needed in a room for the probability of a shared birthday to exceed 50%?", "back": "Answer: 23 — The classic Birthday Paradox requires only 23 people for a >= 50.7% chance of at least one shared birthday." }, { "id": "ct-w05-000", "front": "Week 5 Diagnostic: In 0-indexed list L = [10, 20, 30, 40, 50], what is the value at index 3?", "back": "Answer: 40 — L[0]=10, L[1]=20, L[2]=30, L[3]=40." }, { "id": "ct-w05-001", "front": "Week 5 Diagnostic: What is the worst-case time complexity of Insertion Sort on an array of size N?", "back": "Answer: D — When the array is in reverse sorted order, Insertion Sort makes ~N^2 / 2 comparisons and shifts, giving O(N^2) complexity." }, { "id": "ct-w06-000", "front": "Week 6 Diagnostic: In a dictionary / hash map, what is the expected time complexity to look up a value by its key?", "back": "Answer: A — Dictionaries provide O(1) average-time lookup by key via hash-based indexing." }, { "id": "ct-w06-001", "front": "Week 6 Diagnostic: Can a dictionary have duplicate keys?", "back": "Answer: B — Dictionary keys are strictly unique. Reassigning to an existing key overwrites the previous value." }, { "id": "ct-w07-000", "front": "Week 7 Diagnostic: In a graph G = (V, E), if |V| = 5, what is the dimension of its adjacency matrix?", "back": "Answer: B — An adjacency matrix has rows and columns corresponding to each vertex, so it is a |V| x |V| matrix (5 x 5)." }, { "id": "ct-w07-001", "front": "Week 7 Diagnostic: In an undirected graph, what property does the adjacency matrix always have?", "back": "Answer: B — Since undirected edges are bidirectional ((u, v) = (v, u)), the adjacency matrix is symmetric." }, { "id": "ct-w08-000", "front": "Week 8 Diagnostic: In an edge-weighted graph, what does entry A[i][j] in the adjacency matrix store when an edge exists between vertex i and j?", "back": "Answer: A — In a weighted graph, non-zero matrix entries represent the corresponding edge weights." }, { "id": "ct-w08-001", "front": "Week 8 Diagnostic: If vertex 1 has outgoing directed edges to vertices 2 and 4, how many non-zero entries exist in row 1 of the directed adjacency matrix?", "back": "Answer: 2 — Row 1 encodes the outgoing edges from vertex 1, which corresponds to 2 non-zero entries (at columns 2 and 4)." }, { "id": "ct-w09-000", "front": "Week 9 Diagnostic: Which data structure does Breadth-First Search (BFS) use to manage the discovery frontier?", "back": "Answer: B — BFS processes nodes in level order using a First-In, First-Out Queue." }, { "id": "ct-w09-001", "front": "Week 9 Diagnostic: Why is a `visited` set or boolean array necessary during graph traversal?", "back": "Answer: B — In graphs with cycles, failing to track visited vertices causes the traversal algorithm to loop infinitely." }, { "id": "ct-w10-000", "front": "Week 10 Diagnostic: In Object-Oriented Programming, what is the relationship between a Class and an Object?", "back": "Answer: B — A Class defines the attributes and behavior; an Object is a concrete realization created in memory from that blueprint." }, { "id": "ct-w10-001", "front": "Week 10 Diagnostic: The principle of bundling data and methods that manipulate that data within a single unit while restricting direct outside access is called:", "back": "Answer: B — Encapsulation hides the internal representation and bundles data with methods." }, { "id": "ct-w11-000", "front": "Week 11 Diagnostic: What is the key difference between Concurrency and Parallelism?", "back": "Answer: A — Concurrency structures tasks to make progress independently (interleaving or parallel); parallelism physically executes multiple tasks simultaneously across multiple cores." }, { "id": "ct-w11-001", "front": "Week 11 Diagnostic: An operation that either completes entirely or leaves state unchanged without intermediate observable states is called:", "back": "Answer: B — Atomic operations are indivisible and guarantee safe state transitions in concurrent systems." }, { "id": "ct-w12-000", "front": "Week 12 Diagnostic: In Top-Down system design, what is the starting point of the architecture?", "back": "Answer: B — Top-Down design begins with the high-level system purpose and iteratively breaks it down into smaller sub-components." }, { "id": "ct-w12-001", "front": "Week 12 Diagnostic: In a Decision Tree, what do internal nodes represent?", "back": "Answer: B — Internal nodes test conditions (e.g. Age > 30); terminal leaf nodes output the predicted class or value." } ]