Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 1 out of 2 pages
Exam (elaborations)

EECS 281 EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

Document preview thumbnail
Preview 1 out of 2 pages

EECS 281 EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026 Runtime Factors - Answers Algorithm, Implementation, CPU/Memory Speed, Compiler, Parallel Programs, Input Size Primitive Operations - Answers Variable assignment, arithmetic operation, comparison, array indexing, pointer reference, function call , function return Amortized Complexity - Answers Time of average step in a sequence Tail recursion - Answers Recursion that reuses the stack frame Binary Search Recurrence Equation - Answers T(n) = T(n/2) + c Binary Search Complexity - Answers O(log n) Sequential Search Recurrence Equation - Answers T(n) = T(n-1) + c Sequential Search Complexity - Answers O(n) Tree Traversal Recurrence Equation - Answers T(n) = 2*T(n/2) +c Tree Traversal Complexity - Answers O(n) Selection/etc. Sorts Recurrence Equation - Answers T(n) = T(n-1) +c*n + c Selection/etc. Sorts Complexity - Answers O(n^2) Merge/Quick Sorts Recurrence Equation - Answers T(n) = 2T(n/2)+c*n+c Merge/Quick Sorts Complexity - Answers O(n log n) When can you not use the Master Theorem? (3 ways) - Answers If T(n) is not monotonic, if T(n) is not a polynomial, if b cannot be expressed as a constant 2D Array Index = - Answers row * num_columns + column 2D Column = - Answers index % num_columns 2D Row = - Answers index / num_columns Container Class Operations - Answers Constructor, Destructor, Add, Remove, GetElement, GetSize, Copy, Assignment Big 3 - Answers Destructor, Copy, Operator Arrays vs Linked Lists - Answers Arrays better for smaller data items, wastes memory if too large, Arrays require reallocation if too small, Linked lists allocate memory as needed, but require memory for pointers STL Pros - Answers Some algorithms/DS are hard to implement yourself ,Uniformity, Reduces debugging time for complicated program STL Cons - Answers May only be used for general purpose implementations, Specialized code may run faster Unsorted Sequence Container Insert Complexity - Answers O(1) Unsorted Sequence Container Delete Max Complexity - Answers O(n) Sorted seq container Insert Complexity - Answers O(n) Sorted seq container Delete Max Complexity - Answers O(1) Heap Insert Complexity - Answers O(log n) Heap Delete Complexity - Answers O(log n) Array of linked lists Insert Complexity - Answers O(1) Array of linked lists Delete Complexity - Answers O(1) depth(root) of heap = - Answers 1 depth (node) of heap = - Answers depth(parent) + 1 height(leaf) of heap = - Answers 1 height(node) of heap = - Answers height(child) + 1 Heap ordered tree - Answers a tree where the key of each node is not less than the key of it's children Parent of node i location = - Answers floor(i/2) Children of node i location = - Answers 2*i, 2*i + 1 Fix Up Complexity - Answers O(log n) Fix Down Complexity - Answers O(log n) Heapify Complexity - Answers O(n log n) Ordered Container - Answers Sequential Container which maintains current order and can add an element anywhere Sequential Container - Answers Container that allows iteration over elements in some order Sorted Container - Answers Sequential Container with predefined order and cannot arbitrarily add elements set initialize complexity - Answers O(1) or O(n log n) set clear complexity - Answers O(1) or O(n) set isMember complexity - Answers O(log n) set copy complexity - Answers O(n) set_union complexity - Answers O(n) set_intersection complexity - Answers O(n) Four Elementary Sorts - Answers Bubble sort, Selection sort, insertion sort, bucket/counting sort Elementary Sort Complexity - Answers O(n^2) Quick Sort Best and Average Case Complexity - Answers O(n log n) Quick Sort Worst Case Complexity - Answers O(n^2) Bubble and insertion Sort Best Case complexity - Answers O(n) Merge Sort Complexity - Answers O(n log n)

Content preview

EECS 281 EXAM QUESTIONS ANSWERED CORRECTLY LATEST UPDATE 2026

Runtime Factors - Answers Algorithm, Implementation, CPU/Memory Speed, Compiler, Parallel
Programs, Input Size
Primitive Operations - Answers Variable assignment, arithmetic operation, comparison, array
indexing, pointer reference, function call , function return
Amortized Complexity - Answers Time of average step in a sequence
Tail recursion - Answers Recursion that reuses the stack frame
Binary Search Recurrence Equation - Answers T(n) = T(n/2) + c
Binary Search Complexity - Answers O(log n)
Sequential Search Recurrence Equation - Answers T(n) = T(n-1) + c
Sequential Search Complexity - Answers O(n)
Tree Traversal Recurrence Equation - Answers T(n) = 2*T(n/2) +c
Tree Traversal Complexity - Answers O(n)
Selection/etc. Sorts Recurrence Equation - Answers T(n) = T(n-1) +c*n + c
Selection/etc. Sorts Complexity - Answers O(n^2)
Merge/Quick Sorts Recurrence Equation - Answers T(n) = 2T(n/2)+c*n+c
Merge/Quick Sorts Complexity - Answers O(n log n)
When can you not use the Master Theorem? (3 ways) - Answers If T(n) is not monotonic, if T(n) is not
a polynomial, if b cannot be expressed as a constant
2D Array Index = - Answers row * num_columns + column
2D Column = - Answers index % num_columns
2D Row = - Answers index / num_columns
Container Class Operations - Answers Constructor, Destructor, Add, Remove, GetElement, GetSize,
Copy, Assignment
Big 3 - Answers Destructor, Copy, Operator
Arrays vs Linked Lists - Answers Arrays better for smaller data items, wastes memory if too large,
Arrays require reallocation if too small, Linked lists allocate memory as needed, but require memory
for pointers
STL Pros - Answers Some algorithms/DS are hard to implement yourself ,Uniformity, Reduces
debugging time for complicated program
STL Cons - Answers May only be used for general purpose implementations, Specialized code may run
faster
Unsorted Sequence Container Insert Complexity - Answers O(1)
Unsorted Sequence Container Delete Max Complexity - Answers O(n)
Sorted seq container Insert Complexity - Answers O(n)
Sorted seq container Delete Max Complexity - Answers O(1)
Heap Insert Complexity - Answers O(log n)
Heap Delete Complexity - Answers O(log n)
Array of linked lists Insert Complexity - Answers O(1)
Array of linked lists Delete Complexity - Answers O(1)
depth(root) of heap = - Answers 1
depth (node) of heap = - Answers depth(parent) + 1
height(leaf) of heap = - Answers 1
height(node) of heap = - Answers height(child) + 1
Heap ordered tree - Answers a tree where the key of each node is not less than the key of it's children
Parent of node i location = - Answers floor(i/2)
Children of node i location = - Answers 2*i, 2*i + 1
Fix Up Complexity - Answers O(log n)
Fix Down Complexity - Answers O(log n)
Heapify Complexity - Answers O(n log n)
Ordered Container - Answers Sequential Container which maintains current order and can add an
element anywhere
Sequential Container - Answers Container that allows iteration over elements in some order
Sorted Container - Answers Sequential Container with predefined order and cannot arbitrarily add
elements
set initialize complexity - Answers O(1) or O(n log n)

Document information

Uploaded on
February 14, 2026
Number of pages
2
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
joshuawesonga22
3.4
(12)
Sold
114
Followers
2
Items
14959
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions