UCF FE Runtime Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/44

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering time complexities, tree structures, heaps, sorting algorithms, linked lists, stacks, queues, hashing, and math recurrences for UCF Foundation Exam preparation.

Last updated 6:53 PM on 8/26/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

45 Terms

1
New cards

Quicksort Runtimes

Best case: O(nlog(n))O(n \log(n)), Average case: O(nlog(n))O(n \log(n)), Worst case: O(n2)O(n^2).

2
New cards

Quicksort Worst-Case Degradation

Occurs when the pivot repeatedly creates extremely unbalanced partitions (such as sizes n1n-1 and 00), causing the recursive work to sum to n+(n1)++1=O(n2)n + (n-1) + \dots + 1 = O(n^2).

3
New cards

Merge Sort Runtimes

O(nlog(n))O(n \log(n)) in best, average, and worst cases.

4
New cards

Insertion Sort Runtimes

Best case: O(n)O(n) when already sorted, Average case: O(n2)O(n^2), Worst case: O(n2)O(n^2).

5
New cards

Selection Sort Runtimes

O(n2)O(n^2) in best, average, and worst cases because it scans the unsorted portion to choose the next minimum/maximum.

6
New cards

Bubble Sort Runtimes

With early-exit optimization: Best case O(n)O(n), Average case O(n2)O(n^2), Worst case O(n2)O(n^2). Without early exit, best case is O(n2)O(n^2).

7
New cards

Heap Sort Runtimes

O(nlog(n))O(n \log(n)) in best, average, and worst cases.

8
New cards

Guaranteed Worst-Case O(nlog(n))O(n \log(n)) Comparison Sorts

Merge Sort and Heap Sort. Quicksort does not guarantee this because its worst case is O(n2)O(n^2).

9
New cards

Arbitrary Binary Tree Search Runtime

Worst-case O(n)O(n), because there is no ordering rule to discard a subtree.

10
New cards

BST Search Runtimes

Average case: O(log(n))O(\log(n)) when reasonably balanced. Worst case: O(n)O(n) when degenerated into a chain.

11
New cards

BST Insertion Runtimes

Average case: O(log(n))O(\log(n)) when reasonably balanced. Worst case: O(n)O(n) when highly skewed.

12
New cards

BST Deletion Runtimes

Average case: O(log(n))O(\log(n)) when reasonably balanced. Worst case: O(n)O(n) where search path dominates.

13
New cards

AVL Tree Search Runtime

Worst-case O(log(n))O(\log(n)), because AVL balancing guarantees logarithmic height.

14
New cards

AVL Tree Insertion Runtime

Worst-case O(log(n))O(\log(n)), consisting of O(log(n))O(\log(n)) search down the tree and a constant number of rotations for rebalancing.

15
New cards

AVL Tree Deletion Runtime

Worst-case O(log(n))O(\log(n)), because the tree height is O(log(n))O(\log(n)) and updates/rebalancing occur along a root-to-leaf path.

16
New cards

AVL Tree Height

O(log(n))O(\log(n)) for storing nn items.

17
New cards

Balanced Tree Traversal Runtime

O(log(n))O(\log(n)) for one root-to-leaf traversal in a balanced tree with nn nodes.

18
New cards

Heap Peek Runtime

O(1)O(1) to peek at the minimum in a min-heap or maximum in a max-heap because the desired element is at the root.

19
New cards

Binary Heap Insertion Runtime

Worst-case O(log(n))O(\log(n)) because the new item may percolate up the heap height.

20
New cards

Heap Min/Max Removal Runtime

Worst-case O(log(n))O(\log(n)) because the replacement root may percolate down the heap height.

21
New cards

Bottom-Up Heap Construction Runtime

O(n)O(n) to build a heap from nn unsorted values, which is faster than inserting nn values one at a time.

22
New cards

Heap Construction via N Insertions Runtime

O(nlog(n))O(n \log(n)) to build a heap by performing nn separate heap insertions.

23
New cards

Heapify / Percolate-Down Runtime

Worst-case O(log(n))O(\log(n)) from one node in a heap.

24
New cards

Heap Arbitrary Search Runtime

O(n)O(n) because heap order only guarantees parent-child priority without BST-style left/right ordering.

25
New cards

Stack Push, Pop, and Peek Runtimes

O(1)O(1) each for standard array or linked-list implementations.

26
New cards

Consecutive Stack Pops Runtime

O(p)O(p) for performing pp consecutive pop operations on a stack.

27
New cards

Queue Enqueue, Dequeue, and Front/Peek Runtimes

O(1)O(1) each with a standard linked queue or circular-array queue.

28
New cards

Singly Linked List Kth Node Access Runtime

O(k)O(k), which is worst-case O(n)O(n), requiring traversal of next pointers from the front.

29
New cards

Linked List Fixed Position Deletion Runtime

O(1)O(1) to delete the third node when the list has more than 33 nodes because third is a fixed constant position.

30
New cards

Linked List Front Insertion/Deletion Runtime

O(1)O(1), assuming access to the head pointer.

31
New cards

Linked List Search Runtime

Worst-case O(n)O(n) when searching for a target value.

32
New cards

Hash Table Search, Insert, and Delete Runtimes

Average case: O(1)O(1) with a good hash function and controlled load factor. Worst case: O(n)O(n) if many keys collide or clustering becomes severe.

33
New cards

Hashing Comparison to BST/AVL

Usually faster than BST/AVL lookup with average O(1)O(1), but unlike AVL trees, it can degrade to O(n)O(n) in the worst case.

34
New cards

Array Access by Known Index Runtime

O(1)O(1).

35
New cards

Linear Search Runtime

Worst-case O(n)O(n) through an unsorted array of nn items.

36
New cards

Two Independent Nested Loops Runtime

O(n2)O(n^2) for two independent nested loops that each run nn times.

37
New cards

Logarithmic Loop Runtime

O(log(n))O(\log(n)) for a loop that repeatedly halves nn or doubles a counter until it reaches nn.

38
New cards

Repeated Logarithmic Operation Runtime

O(nlog(n))O(n \log(n)) when an O(log(n))O(\log(n)) operation is repeated nn times.

39
New cards

Harmonic Sum Runtime

O(nlog(n))O(n \log(n)) for n+n/2+n/3++n/nn + n/2 + n/3 + \dots + n/n, because the harmonic sum is O(log(n))O(\log(n)).

40
New cards

Constant Factors in Big-O

Constant factors do not change Big-O (e.g., O(n/2)=O(n)O(n/2) = O(n)), though repeating n/2n/2 operations nn times gives O(n2)O(n^2).

41
New cards

Recurrence T(n)=T(n/2)+O(n)T(n) = T(n/2) + O(n) Runtime

O(n)O(n), where work forms n+n/2+n/4+=O(n)n + n/2 + n/4 + \dots = O(n).

42
New cards

Recurrence T(n)=2T(n/2)+O(n)T(n) = 2T(n/2) + O(n) Runtime

O(nlog(n))O(n \log(n)), having O(log(n))O(\log(n)) levels and O(n)O(n) work per level.

43
New cards

Recurrence T(n)=T(n1)+O(1)T(n) = T(n-1) + O(1) Runtime

O(n)O(n), as input decreases by 11 for about nn recursive calls.

44
New cards

Decimal to Binary Conversion Runtime

O(log(n))O(\log(n)) to convert positive integer nn to binary, as the number of binary digits is proportional to log(n)\log(n).

45
New cards

Array Integer Addition Runtime

O(max(c,d))O(\max(c,d)) to add a cc-digit integer to a dd-digit integer stored digit-by-digit in arrays (O(d)O(d) if dcd \ge c).