CS 1332 Final Exam Plus Time Complexities

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

1/141

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.

142 Terms

1
New cards

O(n)

add to first index of ArrayList

2
New cards

O(1)*

add to last index of ArrayList

3
New cards

O(n)

add to any index of ArrayList

4
New cards

O(n)

remove from first index of ArrayList

5
New cards

O(1)

remove from last index of ArrayList

6
New cards

O(n)

remove from any index of ArrayList

7
New cards

O(1)

search at index in ArrayList

8
New cards

O(n)

search for specific value in ArrayList

9
New cards

O(n)

resize ArrayList

10
New cards

O(1)

add to first index of SLL, no tail

11
New cards

O(n)

add to last index of SLL, no tail

12
New cards

O(n)

add to any index of SLL, no tail

13
New cards

O(1)

remove from first index of SLL, no tail

14
New cards

O(n)

remove from last index of SLL, no tail

15
New cards

O(n)

remove from any index of SLL, no tail

16
New cards

O(n)

search at index in SLL, no tail

17
New cards

O(n)

search for specific value in SLL, no tail

18
New cards

O(1)

add to first index of SLL, with tail

19
New cards

O(1)

add to last index of SLL, with tail

20
New cards

O(n)

add to any index of SLL, with tail

21
New cards

O(1)

remove from first index of SLL, with tail

22
New cards

O(n)

remove from last index of SLL, with tail

23
New cards

O(n)

remove from any index of SLL, with tail

24
New cards

O(n)

search at index in SLL, with tail

25
New cards

O(n)

search for specific value in SLL, with tail

26
New cards

O(1)

add to first index of CSLL

27
New cards

O(1)

add to last index of CSLL

28
New cards

O(n)

add to any index of CSLL

29
New cards

O(1)

remove from first index of CSLL

30
New cards

O(n)

remove from last index of CSLL

31
New cards

O(n)

remove from any index of CSLL

32
New cards

O(n)

search at index in CSLL

33
New cards

O(n)

search for specific value in CSLL

34
New cards

O(1)

add to first index of DLL with tail

35
New cards

O(1)

add to last index of DLL with tail

36
New cards

O(n)

add to any index of DLL with tail

37
New cards

O(1)

remove from first index of DLL with tail

38
New cards

O(1)

remove from last index of DLL with tail

39
New cards

O(n)

remove from any index of DLL with tail

40
New cards

O(n)

search at index in DLL with tail

41
New cards

O(n)

search for specific value in DLL with tail

42
New cards

O(1)*

add to last index of Stack (array-backed)

43
New cards

O(1)

remove from last index of Stack (array-backed)

44
New cards

O(n)

resize Stack (array-backed)

45
New cards

O(1)*

add to last index of Queue (array-backed)

46
New cards

O(1)

remove from first index of Queue (array-backed)

47
New cards

O(n)

resize Queue (array-backed)

48
New cards

O(1)*

add to first index of Deque (array-backed)

49
New cards

O(1)*

add to last index of Deque (array-backed)

50
New cards

O(1)

remove from first index of Deque (array-backed)

51
New cards

O(1)

remove from last index of Deque (array-backed)

52
New cards

O(n)

resize Deque (array-backed)

53
New cards

O(n)

add to BST

54
New cards

O(n)

search in BST

55
New cards

O(n)

remove from BST

56
New cards

O(logn)*

add to Heap

57
New cards

O(logn)

remove from Heap

58
New cards

O(n)

add to HashMap with External Chaining

59
New cards

O(n)

search in HashMap with External Chaining

60
New cards

O(n)

remove from HashMap with External Chaining

61
New cards

O(n^2)

add to HashMap with Linear/Quadratic Probing

62
New cards

O(n)

search in HashMap with Linear/Quadratic Probing

63
New cards

O(n)

remove from HashMap with Linear/Quadratic Probing

64
New cards

O(logn)

add to AVL

65
New cards

O(logn)

search in AVL

66
New cards

O(logn)

remove from AVL

67
New cards

O(n)

add to SkipList

68
New cards

O(n)

search in SkipList

69
New cards

O(n)

remove from SkipList

70
New cards

O(logn)

add to 2-4 Tree

71
New cards

O(logn)

search in 2-4 Tree

72
New cards

O(logn)

remove from 2-4 Tree

73
New cards

O(n)

best-case of Bubble Sort

74
New cards

O(n^2)

worst-case of Bubble Sort

75
New cards

yes

Bubble Sort stable?

76
New cards

yes

Bubble Sort in-place?

77
New cards

yes

Bubble Sort adaptive?

78
New cards

O(n)

best-case of Insertion Sort

79
New cards

O(n^2)

worst-case of Insertion Sort

80
New cards

yes

Insertion Sort stable?

81
New cards

yes

Insertion Sort in-place?

82
New cards

yes

Insertion Sort adaptive?

83
New cards

O(n^2)

best-case of Selection Sort

84
New cards

O(n^2)

worst-case of Selection Sort

85
New cards

no

Selection Sort stable?

86
New cards

yes

Selection Sort in-place?

87
New cards

no

Selection Sort adaptive?

88
New cards

O(n)

best-case of Cocktail Shaker Sort

89
New cards

O(n^2)

worst-case of Cocktail Shaker Sort

90
New cards

yes

Cocktail Shaker Sort stable?

91
New cards

yes

Cocktail Shaker Sort in-place?

92
New cards

yes

Cocktail Shaker Sort adaptive?

93
New cards

O(nlogn)

best-case of Merge Sort

94
New cards

O(nlogn)

worst-case of Merge Sort

95
New cards

yes

Merge Sort stable?

96
New cards

no

Merge Sort in-place?

97
New cards

no

Merge Sort adaptive?

98
New cards

O(nlogn)

best-case of Quick Sort

99
New cards

O(n^2)

worst-case of Quick Sort

100
New cards

no

Quick Sort stable?