time complexity

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/42

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

43 Terms

1
New cards

mergesort runtime

o(n log n)

2
New cards

insert item into BST

o(height of root node)

3
New cards

check if BST contains an item

o(height of root node)

4
New cards

remove item from BST

o(height of root node)

5
New cards

AVL insert

o(log n)

6
New cards

AVL remove

o(log n)

7
New cards

AVL contains

o(log n)

8
New cards

AVL find

o(log n)

9
New cards

linked list enqueue

o(1)

10
New cards

sorted linked list enqueue

o(n)

11
New cards

multiple queues(k priority) enqueue

o(1)

12
New cards

balanced BST enqueue

θ(log n)

13
New cards

linked list dequeue

o(n)

14
New cards

sorted linked list dequeue

o(1)

15
New cards

multiple queues (k priority) dequeue

o(k)

16
New cards

balanced BST dequeue

θ(log n)

17
New cards

linked list size

o(1)

18
New cards

sorted linked list size

o(1)

19
New cards

multiple queues (k priority) size

o(k)

20
New cards

balanced BST size

o(1)

21
New cards

worst case removing smallest item from a heap w/ size n

o(log n)

22
New cards

linked list peek

o(n)

23
New cards

sorted linked list peek

o(1)

24
New cards

multiple queues (k priorities) peek

o(k)

25
New cards

balanced BST peek

θ(log n)

26
New cards

heap enqueue worst time complexity

o(log n)

27
New cards

heap enqueue average time complexity

o(1)

28
New cards

heap dequeue

o(log n)

29
New cards

heap peek

o(1)

30
New cards

heap size

o(1)

31
New cards

heap remove minimum item

o(n log n)

32
New cards

unsorted list contains

o(n)

33
New cards

sorted list contains

o(log n)

34
New cards

queue contains

o(n)

35
New cards

stack contains

o(n)

36
New cards

tree contains

o(n)

37
New cards

balanced BST contains

o(log n)

38
New cards

heap contains

o(n)

39
New cards

adding item to a hashtable w/ chaining worst time complexity

o(n)

40
New cards

adding item to a hashtable w/ chaining average time complexity

o(1)

41
New cards

adding items to a hashtable w/ linear probing worst time complexity

o(n)

42
New cards

adding items to a hashtable w/ linear probing average time complexity

o(1)

43
New cards

BFS

o(V+E)