Graphs in Data Structures

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

These flashcards cover fundamental concepts and terminologies related to graphs in data structures.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

Graph (in Data Structure)

A non-linear data structure consisting of nodes (vertices) and edges that represent relationships between objects/entities.

2
New cards

Edge

A connection between two nodes in a graph that denotes the relationship between them.

3
New cards

Node (or Vertex)

An individual object or entity within a graph.

4
New cards

Directed Graph

A graph where edges have specific directions.

5
New cards

Undirected Graph

A graph where edges have no specific directions.

6
New cards

Weighted Graph

A graph in which edges have associated numerical values (weights).

7
New cards

Unweighted Graph

A graph where edges do not have associated numerical values or weights.

8
New cards

Cyclic Graph

A graph that contains at least one cycle, which is a path that starts and ends at the same node without revisiting any nodes.

9
New cards

Acyclic Graph

A graph that does not contain any cycles.

10
New cards

Adjacency Matrix

A 2-D array representation of a graph where rows and columns represent nodes, and a value at arr(u,v) indicates the presence of an edge between nodes u and v.

11
New cards

Adjacency List

A representation of a graph where each node has an associated list containing its neighboring nodes.

12
New cards

Breadth First Search (BFS)

A traversal algorithm that explores a graph level-by-level, using a queue.

13
New cards

Depth First Search (DFS)

A traversal algorithm that explores a graph branch-by-branch, using a stack.

14
New cards

Space Complexity of Adjacency Matrix

O(n^2) where n is the number of nodes in the graph.

15
New cards

Space Complexity of Adjacency List

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