AI Midterm

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

1/10

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 1:31 AM on 3/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

What is the space complexity of BFS?

O(V) to store the queue and visited set.

2
New cards

What is Depth First Search (DFS?)

An algorithm for traversing or searching tree or graph data structures. It starts at the root (or an arbitrary node) and explores as far as possible along each branch before backtracking.

3
New cards

What does DFS use?

Uses a Stack to keep track of nodes. Follows LIFO (Last-In, First-Out) logic.

4
New cards

What is the time complexity for DFS?

5
New cards

What is the time complexity of BFS?

O (V+E) where V is vertices and E is edges.

6
New cards

What is the main use of BFS?

Finding the shortest path between two nodes in an unweighted graph (minimum number of edges).

7
New cards

What is Breadth First Search (BFS)?

A graph traversal algorithm that explores nodes layer-by-layer, visiting all neighbors at the current depth before moving to nodes at the next depth level.

8
New cards

How does BFS work?

It uses a Queue (FIFO - First In, First Out) to manage nodes, exploring horizontally across the graph before going deeper.

9
New cards

What are 3 real-world applications of BFS?

  1. Social Networking: Finding "friends of friends" (degrees of separation).

  2. Web Crawling: Mapping links level-by-level.

  3. GPS Navigation: Finding neighboring locations.

10
New cards

Why does BFS use a "visited" set?

To keep track of visited nodes and avoid cycles (infinite loops) in graphs.

11
New cards

BFS vs. DFS: Key Difference

  • BFS: Uses a Queue, explores layer-by-layer (horizontal).

  • DFS: Uses a Stack (or recursion), explores branch-by-branch (vertical)

Explore top notes

note
English 2 Vocab 1
Updated 1198d ago
0.0(0)
note
Ch 2: Ecosystems and Ecology
Updated 1064d ago
0.0(0)
note
Factors and Multiples
Updated 1189d ago
0.0(0)
note
2.8: acids
Updated 1257d ago
0.0(0)
note
2. New and Emerging Technologies
Updated 1121d ago
0.0(0)
note
In Sickness and in Health
Updated 1064d ago
0.0(0)
note
concussion infographics
Updated 467d ago
0.0(0)
note
English 2 Vocab 1
Updated 1198d ago
0.0(0)
note
Ch 2: Ecosystems and Ecology
Updated 1064d ago
0.0(0)
note
Factors and Multiples
Updated 1189d ago
0.0(0)
note
2.8: acids
Updated 1257d ago
0.0(0)
note
2. New and Emerging Technologies
Updated 1121d ago
0.0(0)
note
In Sickness and in Health
Updated 1064d ago
0.0(0)
note
concussion infographics
Updated 467d ago
0.0(0)

Explore top flashcards

flashcards
3. Fallacies
30
Updated 831d ago
0.0(0)
flashcards
Spanish capitals
20
Updated 1210d ago
0.0(0)
flashcards
honors english exam terms
40
Updated 1197d ago
0.0(0)
flashcards
17 - TỪ VỰNG | Quizlet
23
Updated 560d ago
0.0(0)
flashcards
vocab 4
42
Updated 539d ago
0.0(0)
flashcards
Wetter
47
Updated 1062d ago
0.0(0)
flashcards
3. Fallacies
30
Updated 831d ago
0.0(0)
flashcards
Spanish capitals
20
Updated 1210d ago
0.0(0)
flashcards
honors english exam terms
40
Updated 1197d ago
0.0(0)
flashcards
17 - TỪ VỰNG | Quizlet
23
Updated 560d ago
0.0(0)
flashcards
vocab 4
42
Updated 539d ago
0.0(0)
flashcards
Wetter
47
Updated 1062d ago
0.0(0)