FlashKeepers

Computer Science · College · College and University

Big-O Complexity Cheat Sheet

Time and space complexity of common data structure operations and algorithms, plus amortized analysis and recurrence solutions.

About this set

40 basic cards for College Computer Science. It opens with "What is the time complexity of accessing an element in an array by index?" and "What is the time complexity of searching for a value in an unsorted array?". Study it alongside the other College sets below.

40 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is the time complexity of accessing an element in an array by index?
Show answerO(1) constant time
What is the time complexity of searching for a value in an unsorted array?
Show answerO(n) linear time
What is the time complexity of inserting an element into an array?
Show answerO(n) linear time
What is the time complexity of deleting an element from an array?
Show answerO(n) linear time
What is the time complexity of accessing an element by position in a singly linked list?
Show answerO(n) linear time
What is the time complexity of inserting at the head of a singly linked list?
Show answerO(1) constant time
What is the time complexity of deleting the head node from a singly linked list?
Show answerO(1) constant time
What is the average-case time complexity of searching in a hash table?
Show answerO(1) constant time
What is the worst-case time complexity of searching in a hash table?
Show answerO(n) linear time
What is the average-case time complexity of search, insert, and delete in a binary search tree?
Show answerO(log n) logarithmic time
What is the worst-case time complexity of operations in an unbalanced binary search tree?
Show answerO(n) linear time
What is the time complexity of all operations in an AVL tree or Red-Black tree?
Show answerO(log n) logarithmic time
What is the time complexity of inserting an element into a binary heap?
Show answerO(log n) logarithmic time
What is the time complexity of removing the minimum element from a min-heap?
Show answerO(log n) logarithmic time
What is the time complexity of peeking at the minimum element in a min-heap?
Show answerO(1) constant time

25 more cards in the app

Study this set free