complexity of adjaceny matrix and adjacency list

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

1/8

flashcard set

Earn XP

Description and Tags

quizley

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

9 Terms

1
New cards

edge query , are the two nodes connected for adjacency list

0(|v|)

2
New cards

edge query , are the two nodes connected for adjacency matrices

o(1)

3
New cards

inserting a node :adding a new node to the graph AL

O(1)

4
New cards

inserting node: add a node to the graph AM

O(|v|²)

5
New cards

removing a node AL

O(|E|)

6
New cards

removing a node AM

O(|V|²)

7
New cards

inserting an edge O(1) AM

O(1)

8
New cards

Removing an edge AL

O(|V|)

9
New cards

Removing an edge AM

O(|1)