CramDesk.
All decks
CramDesk · Free20 cards

Algorithms

The basics of reading and analyzing algorithms. A starter deck to adapt to your course and level.

Active recall session

20 / 40 cards

Loading your cards…

Loading your cards…

Up to 40 cards per deck

Cards stay in this browser. Export the file to keep or transfer them.

Questions in this deck

01What is an algorithm?

A finite sequence of precise instructions for solving a problem.

02What condition is required for binary search?

The elements must be sorted in a known order.

03What is the time complexity of binary search?

O(log n) in a sorted, indexable collection.

04What order does a stack use?

Last in, first out (LIFO).

05What is a variable for?

It associates a name with a value that can be read and possibly changed.

06What does a loop do?

It repeats instructions according to a condition or iteration count.

07What does “Indexed array” mean?

A structure allowing direct access to an element by its position.

08What does “FIFO queue” mean?

First in, first out.

09What does “Recursive base case” mean?

The condition that stops recursive calls.

10What does “Linear search” mean?

Checks elements one by one; worst-case time O(n).

11What does “Merge sort” mean?

Divide-and-merge sort with O(n log n) time complexity.

12What does “Hash table” mean?

A structure with near O(1) average lookup under suitable hashing assumptions.

13What does “Graph” mean?

A set of vertices connected by edges.

14What does “Breadth-first search BFS” mean?

Explores vertices by increasing distance using a queue.

15What does “Depth-first search DFS” mean?

Explores one branch before backtracking, using a stack or recursion.

16What does “Logical AND” mean?

True only when both conditions are true.

17What does “Off-by-one error” mean?

A loop starts or ends one position too early or too late.

18What does “Loop invariant” mean?

A property true before and after each iteration.

19What does “Worst-case complexity” mean?

A bound on the maximum cost for an input size.

20What does “Stable sort” mean?

Preserves the relative order of items with equal keys.