Big - O Analysis

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/10

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:25 AM on 7/31/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

What is Big-O?

A measure of how an algorithm’s running time grows as the input size (n) becomes very large.

2
New cards

When looking at an expression, which term is typically considered when writing the notation of Big-O (hint: what gets written into the parentheses)?

The highest-degree term.

3
New cards

Describe the scenarios and methodology (if applicable) for O(1) runtime.

  • Running time stays the same no matter the size of n, quick in efficiency.

  • Common in programs that don’t use loops.

  • Data structure operations (insertion, removal, lookup) that occur at the ends of the structure.

4
New cards

Describe the scenarios and methodology (if applicable) for O(n) runtime.

  • Linear growth; running time grows proportionally to input size (n).

  • Typical in programs that use loops and/or have data structure operations (insertion, removal) within the middle of the structure, regardless of size.

  • Traversing a data structure since we could be scanning every element at worst-case scenario.

5
New cards

Describe the scenarios and methodology (if applicable) for O(n²) runtime.

  • Occurs in programs that use nested loops (typically when you need to traverse a 2D array).

  • Need to traverse a single array n times.

  • Insertion sort: inserting an element at the middle of a Data Structure n times.

6
New cards

Describe the scenarios and methodology (if applicable) for O(log n) runtime.

  • Occurs in binary search algorithms on data structures (ie. Arrays, Trees) and in general.

  • Push and Pop methods on Heaps.

7
New cards

Describe the scenarios and methodology (if applicable) for O(n log n) runtime.

  • Found in many sorting algorithms & built-in sorting functions.

8
New cards

Describe the scenarios and methodology (if applicable) for O(2n) runtime.

  • Common in recursive programs.

9
New cards

Describe the scenarios and methodology (if applicable) for O[ sqrt(n) ] runtime.

  • Rare, but found in programs that involve finding factors of number(s).

10
New cards

Describe the scenarios and methodology (if applicable) for O(n!) runtime.

  • Found in permutation programs and graph problems.

  • Most inefficient.

11
New cards

What is the time complexity for sequential for loops (not nested)?

O(n)