In a table of student information, what do the rows and columns represent?
7 Data Structures for Problem Solving Online Quiz Questions
Use this free practice quiz with 20 questions to review 7 Data Structures for Problem Solving, test your knowledge, and prepare for your next test or exam.
A record groups related fields that describe one entity.
- A
True
- B
False
A list has four elements. What is the final valid zero-based index?
- A
0
- B
2
- C
3
- D
4
What collection operation processes elements one at a time?
In the school-system example, the students variable uses an outer containing one for each student.
Why can inserting an element near the beginning of an array-like contiguous sequence be costly?
- A
It automatically changes every element into a record.
- B
It may require other elements to shift positions.
- C
It prevents the collection from being traversed.
- D
It converts the sequence into a database table.
Which operations are supported by strings according to the material? Select all that apply.
- A
Indexing
- B
Sorting records by a database key
- C
Searching
- D
Replacing
A contact application must frequently find a contact by username and eventually search, sort, filter, and persist millions of contacts. Which two structures best match these requirements? Select all that apply.
- A
A dictionary keyed by username for frequent username lookup
- B
A list solely because contacts are stored as text
- C
A stack because contacts are records
- D
A database table with suitable indexes for large persistent data
A program changes a student's existing grade from 95 to 98. Which collection operation is being performed?
In the sequence [10, 20, 30], position 1 is the , and 20 is the stored at that position.
When a table may be reordered, an algorithm should identify the student to update by a stable key rather than by the student's current position.
- A
True
- B
False
Which approach is recommended for efficient construction of a large string from many pieces?
- A
Repeatedly concatenate directly to the same large string
- B
Collect pieces in a list and join them once
- C
Store every character in a database table before combining them
- D
Replace all strings with records
Assigning a value to an existing dictionary key replaces the value previously associated with that key.
- A
True
- B
False
In Python, if word = "Structure", what value does word[1:4] produce?
- A
truct
- B
tru
- C
trucT
- D
ruct
What is the result of this Python expression? scores = [72, 88, 91, 64]; passing = [score for score in scores if score >= 70]
- A
[64, 72, 88]
- B
[72, 88, 91, 64]
- C
[72, 88, 91]
- D
[88, 91]
A program has student = {"id": 1042, "name": "Ada Lovelace", "grade": 95}. What is the effect of executing student["grade"] = 98?
- A
The value of
student["grade"]becomes 98. - B
A new key named
"grade2"is created with value 98. - C
The dictionary becomes invalid because an existing key cannot be assigned.
- D
The value of
student["name"]becomes 98.
Given a students table with unique id values, what does this SQL statement do? UPDATE students SET grade = 98 WHERE id = 1042;
- A
Every student's grade is changed to 98.
- B
Only the first row in the table is changed.
- C
The row with grade 1042 is changed to 98.
- D
The row with
id1042 is changed to 98.
What property of strings means that an operation such as concatenation creates a new string instead of changing the original string in place?
What is the arithmetic average of the list [72, 88, 91, 64]? Enter the value as a number.
Consider this Python code:\n\na = [1, 2]\nb = a\nb.append(3)\n\nWhat are the final values of a and b, why do they have those values, and how would you change the code so that appending to b does not change a?
Related study packs and tools
02 — Information and Representation
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
2 Digital Logic
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
03 — Python Programming Fundamentals
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
05 — Data Structures: Concepts, Operations, and Trade-Offs
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
6 Computer Memory
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
07 Trees and Binary Search Trees
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
08 — Discrete Mathematics for Computer Science
A focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
10 — Data, Systems, and Applications
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.
12 — Foundations Capstone
A medium-difficulty quiz on integrating problem definition, representation, algorithms, complexity analysis, testing, correctness, ethical evaluation, and documentation in a computer science capstone.
12 — Foundations Capstone: Integrating Computer Science
A practical guide to integrating problem definition, data representation, modular programming, algorithms, complexity analysis, testing, correctness, and ethical evaluation into a responsible computer science capstone.
OS Processes
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.