Algorithms and Data Structures Review Flashcards

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/41

flashcard set

Earn XP

Description and Tags

Vocabulary-style flashcards covering algorithm fundamentals, complexities, graph theory, sorting algorithms, and problem-solving techniques like dynamic programming and backtracking.

Last updated 1:20 AM on 7/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

42 Terms

1
New cards

Algorithm

A step-by-step procedure used to solve a problem or perform a task.

2
New cards

Characteristics of a Good Algorithm

It should be correct, efficient, clear, finite (must stop), and easy to understand.

3
New cards

Time Complexity

The measure of how much time an algorithm takes to execute.

4
New cards

Space Complexity

The amount of memory required by an algorithm during execution.

5
New cards

Big-O Notation

A notation used to represent the efficiency of an algorithm in terms of time or space complexity.

6
New cards

Graph

A collection of vertices (nodes) and edges connecting them.

7
New cards

Weighted Graph

A graph in which edges have weights or costs assigned to them.

8
New cards

Spanning Tree

A tree that connects all vertices of a graph without cycles.

9
New cards

Minimum Spanning Tree (MST)

A spanning tree with the minimum total edge weight.

10
New cards

Prim's Algorithm

A greedy method used to find the minimum spanning tree by selecting minimum-cost edges.

11
New cards

Kruskal's Algorithm

A greedy algorithm that finds the minimum spanning tree by selecting edges in increasing order of weight.

12
New cards

Cycle Detection in Kruskal's

A process needed to avoid forming loops and ensure a valid spanning tree.

13
New cards

Floyd's Algorithm

An algorithm that finds the shortest paths between all pairs of vertices in a graph.

14
New cards

Warshall's Algorithm

An algorithm used to find the transitive closure of a graph.

15
New cards

Transitive Closure

A representation showing whether a path exists between every pair of vertices in a graph.

16
New cards

Dijkstra's Algorithm

An algorithm that finds the shortest path from a source vertex to all other vertices.

17
New cards

Dijkstra's Algorithm Failure Condition

It fails for negative edge weights because they may give incorrect shortest paths.

18
New cards

Time Complexity of Dijkstra's (Adjacency Matrix)

O(V2)O(V^2)

19
New cards

Topological Sorting

The linear ordering of vertices in a directed graph.

20
New cards

Directed Acyclic Graph (DAG)

A directed graph with no cycles.

21
New cards

0/1 Knapsack Problem

A problem where an item is either completely included or excluded from the knapsack, solved using dynamic programming.

22
New cards

Dynamic Programming

A method of solving problems by breaking them into smaller subproblems and storing results.

23
New cards

Fractional Knapsack

A problem where items can be taken partially, solved using the greedy method.

24
New cards

Selection Sort

A sorting algorithm that repeatedly selects the smallest element and places it in the correct position.

25
New cards

Selection Sort Time Complexity

O(n2)O(n^2)

26
New cards

Quick Sort

A divide-and-conquer sorting algorithm that uses a pivot element.

27
New cards

Quick Sort Average-case Complexity

O(nlog(n))O(n \log(n))

28
New cards

Quick Sort Worst-case Complexity

O(n2)O(n^2)

29
New cards

Merge Sort

A stable divide-and-conquer algorithm that divides and merges sorted arrays with a time complexity of O(nlog(n))O(n \log(n)).

30
New cards

Recursion

A process where a function calls itself.

31
New cards

Backtracking

A method of solving problems by trying solutions and undoing wrong choices.

32
New cards

N-Queens Problem

The problem of placing NN queens on a chessboard so that no two queens attack each other.

33
New cards

N-Queens Worst-case Complexity

O(N!)O(N!)

34
New cards

Sum of Subsets Problem

The problem of finding subsets whose sum equals a given target value.

35
New cards

State-Space Tree

A tree representing all possible solutions of a problem.

36
New cards

Greedy vs. Dynamic Programming

Greedy makes local optimal choices, while dynamic programming solves subproblems and stores results.

37
New cards

BFS (Breadth-First Search)

An exploration method that visits nodes level by level.

38
New cards

DFS (Depth-First Search)

An exploration method that explores deeply before backtracking.

39
New cards

Adjacency Matrix

A 2D array used to represent graph connections.

40
New cards

Adjacency List

A method of storing connected vertices as lists.

41
New cards

Priority Queue

A data structure where elements are served based on priority.

42
New cards

Algorithm Analysis

The evaluation of an algorithm to determine efficiency in terms of time and memory usage.