Explore foundational software and algorithm concepts through data structures and how they work.
Answer each question first, then check with “Show the answer”. You can also play the same quiz in the Quizera app by searching for it in Explore, as a live game, a test or flashcards.
What are the named inputs specified in a function definition called?
- Return values
- Arguments
- Local variables
- Parameters
Show the answer
D) Parameters
What condition must an array meet for binary search to work correctly?
- No duplicate elements
- Sorted order
- An odd number of elements
- A fixed length
Show the answer
B) Sorted order
What condition ends the calls of a recursive function?
- Operator precedence
- Scope
- Base case
- Return type
Show the answer
C) Base case
Which access principle removes the most recently added stack item first?
- Random access
- FIFO
- LIFO
- Priority order
Show the answer
C) LIFO
In what order does a standard queue process items?
- FIFO
- Ascending order
- Priority order
- LIFO
Show the answer
A) FIFO
Which two basic values can a Boolean variable hold?
- True and false
- Positive and negative
- Zero and one
- On and off
Show the answer
A) True and false
If an algorithm does constant-time work on each of n items and no other n-dependent work, what is its time complexity?
- O(n²)
- O(log n)
- O(n)
- O(1)
Show the answer
C) O(n)
What property does a stable sorting algorithm preserve for items with equal keys?
- Their total count
- Their data types
- Their memory addresses
- Their relative order
Show the answer
D) Their relative order
What occurs when two distinct keys in a hash table map to the same slot?
- An overflow
- A collision
- A cycle
- Fragmentation
Show the answer
B) A collision
What is an object called if its state cannot be changed after creation?
- Shared object
- Immutable object
- Temporary object
- Derived object
Show the answer
B) Immutable object
Play it in the app
To play “The Building Blocks of Software” live with friends or a class, start a game from the Android app; players join from a browser with the PIN.
