COP 3530 Final Exam Review

5.0(1)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/32

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.

33 Terms

1
New cards

Computational complexity of accessing an item at a specified index in an array based list

O(1)

2
New cards

Computational complexity of accessing an item at a specified index in a reference based (linked) list

O(n)

3
New cards

Computational complexity of adding an item to an array based list

O(1)

4
New cards

Computational complexity of adding an item to a reference based list

O(n)

5
New cards

Computational complexity of inserting and deleting for BST

O(log n)

6
New cards

I make it easy to access the item most recently added or accessed

Splay Tree

7
New cards

I guarantee balance after every insertion

AVL Tree

8
New cards

Every access is at a leaf

B+ Tree

9
New cards

I use color changes and rotations to maintain similar path lengths to each leaf

Red-Black Tree

10
New cards

Computational complexity for access, insertion, deletion in a hash table

O(1)

11
New cards

Array implémentation of a heap has a root at

1

12
New cards

An item at index i has a left child at

2i

13
New cards

An item at index I has a right child at

2i + 1

14
New cards

An item at index I has a parent at

floor (I/2)

15
New cards

Computational complexity of selection sort

O(n^2)

16
New cards

Computational complexity of insertion sort (average)

O(n^2)

17
New cards

Computational complexity of Insertion sort (best)

O(n)

18
New cards

Computational complexity of bubble sort (average)

O(n^2)

19
New cards

Computational complexity of bubble sort (best)

O(n)

20
New cards

Computational complexity of quick sort (average)

O(n log n) (divide and conquer)

21
New cards

Computational complexity of quick sort (worst)

O(n^2) (divide and conquer)

22
New cards

Computational complexity of merge sort

O(n log n) (divide an conquer)

23
New cards

Computational complexity of heap sort

O(n log n)

24
New cards

Greedy algorithm

Solves problems in steps and takes an optimum at each step

25
New cards

Dynamic programming

Solves the problem in steps starting at the lowest step and building up (overlapping subproblems)

26
New cards

Divide and conquer

Splits the problem into smaller parts and recursively solves the smaller versions

27
New cards

Brute force

Checks every possible solution

28
New cards

The following recurrence relation used to solve a problem is indicative of what type of algorithm?

S(i, W) = max( S(i-1, W) , S(i-1, W-wi + vi)

Dynamic programming

29
New cards

Uses a table

Dynamic programming

30
New cards

The only way to get the optimal solution for np problems

Brute force

31
New cards

Solved using recursion

Divide and conquer

32
New cards

Recursive factorial complexity

O(n)

33
New cards

Complexity (avg) of insertion/deletion of heaps

O(log n)