Data structures and algorithms

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/45

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:26 AM on 9/24/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

46 Terms

1
New cards

Algorithm

A sequence of unambiguous instructions for solving a problem — obtaining a required output for any legitimate input in a finite amount of time.

2
New cards

Finiteness (algorithm property)

An algorithm must terminate after a finite number of steps.

3
New cards

Definiteness (algorithm property)

Each step of an algorithm must be unambiguously specified.

4
New cards

Input (algorithm property)

The valid range of inputs to an algorithm must be clearly specified.

5
New cards

Output (algorithm property)

An algorithm can be proved to produce the correct output given a valid input.

6
New cards

Effectiveness (algorithm property)

Each step of an algorithm must be sufficiently simple and basic to be carried out.

7
New cards

Pseudocode

A way of specifying an algorithm that is compact, independent of any programming language, and easy for humans to read.

8
New cards

Sorting problem

Given a sequence of n numbers, produce a reordering of that sequence so each element is less than or equal to the one after it.

9
New cards

Stable sorting algorithm

A sorting algorithm that preserves the relative order of any two equal elements in its input.

10
New cards

In-place sorting algorithm

A sorting algorithm that does not require extra memory except possibly for a few memory units.

11
New cards

Brute force

An algorithm design strategy that solves a problem in the most straightforward way based on the problem's statement and definitions.

12
New cards

Decrease and conquer

An algorithm design strategy that reduces a problem instance to a smaller instance of the same problem and solves that.

13
New cards

Divide and conquer

An algorithm design strategy that divides a problem into several smaller subproblems, solves each, and combines the solutions.

14
New cards

Transform and conquer

An algorithm design strategy that transforms a problem into another, easier-to-solve problem.

15
New cards

Greedy approach

An algorithm design strategy that makes the locally optimal choice at each step, hoping to find a global optimum.

16
New cards

Dynamic programming

An algorithm design strategy that solves problems by combining solutions to overlapping subproblems, typically storing results to avoid recomputation.

17
New cards

Backtracking / branch and bound

Algorithm design strategies that systematically search through a space of candidate solutions, abandoning ('pruning') branches that cannot lead to a valid or optimal solution.

18
New cards

Array

A sequence of n items of the same data type, stored contiguously in memory and accessible by index in constant time.

19
New cards

Linked list

A sequence of elements called nodes, each containing data and a pointer to the next node; accessed by traversing from the header.

20
New cards

Doubly linked list

A linked list in which every node (except the first and last) contains pointers to both its successor and its predecessor.

21
New cards

Stack

A data structure with 'last in, first out' (LIFO) access, supporting push, pop, and top operations.

22
New cards

Queue

A data structure with 'first in, first out' (FIFO) access, supporting enqueue and dequeue operations.

23
New cards

Priority queue

A data structure (often implemented as a heap) that supports finding/deleting the largest element and inserting new elements.

24
New cards

Graph

A structure G =

25
New cards

Loop (graph)

An edge that connects a vertex to itself.

26
New cards

Complete graph

A graph in which every pair of vertices is connected by an edge, denoted K|V|.

27
New cards

Dense graph

A graph in which only a relatively small number of possible edges are missing.

28
New cards

Sparse graph

A graph with relatively few edges compared to the maximum possible.

29
New cards

Adjacency matrix

A |V| x |V| matrix representation of a graph where each cell indicates whether an edge exists between two vertices; symmetric for undirected graphs.

30
New cards

Adjacency list

A graph representation where each vertex has a list of the vertices it is connected to; efficient for sparse graphs.

31
New cards

Weighted graph

A graph in which a weight or cost is assigned to each edge, used in problems like shortest path and traveling salesman.

32
New cards

Path (graph)

A sequence of adjacent vertices starting from vertex u and ending at vertex v.

33
New cards

Simple path

A path in which all traversed edges and vertices are distinct.

34
New cards

Connected graph

A graph in which there exists a path between every pair of vertices.

35
New cards

Cycle

A simple path that starts and ends at the same vertex (not the same as a loop).

36
New cards

Acyclic graph

A graph that contains no cycles.

37
New cards

Tree (free tree)

A connected acyclic graph.

38
New cards

Forest

An unconnected acyclic graph (a collection of trees).

39
New cards

Rooted tree

A tree in which one vertex is designated as the root, placed at level 0, with the rest of the tree organized beneath it.

40
New cards

Depth of a vertex

The length of the path from the root to that vertex in a rooted tree.

41
New cards

Height of a tree

The length of the longest simple path from the root to a leaf.

42
New cards

Binary tree

A tree in which each vertex has no more than two children.

43
New cards

Binary search tree

A binary tree in which the value at each parent node is larger than all values in its left subtree and smaller than all values in its right subtree.

44
New cards

Set

An unordered collection of unique items, supporting operations like membership checking, union, and intersection.

45
New cards

Dictionary (data structure)

A set with the added operations of searching, adding, and deleting elements.

46
New cards