What is the time complexity of accessing an element in an array using its index?
O(1)
O(log n)
O(n)
O(n log n)
Which notation represents a strict upper bound, meaning the function grows strictly slower than the specified function?
Little-o (o)
Big Theta (Θ)
Little-omega (ω)
Big-O (O)
Which of the following statements is TRUE regarding the trade-off between code optimization and readability?
Highly optimized code is always easier to read and maintain.
Excessive optimization can sometimes hinder code readability, making maintenance difficult.
There's no trade-off; optimal performance and readability always go hand-in-hand.
Code readability is irrelevant as long as the code achieves optimal performance.
What is the best-case time complexity of the insertion sort algorithm?
What does it mean if an algorithm has a time complexity of Ω(n log n)?
It has a logarithmic growth rate.
It runs in exactly n log n time.
It runs in at most n log n time.
It runs in at least n log n time.
What is the time complexity of finding the Fibonacci number at position n using a recursive approach without memoization?
O(2^n)
O(n^2)
Merge sort and heapsort are examples of sorting algorithms with which time complexity?
Which of the following is NOT a valid reason for analyzing an algorithm's time complexity?
Comparing the efficiency of different algorithms for a given task
Identifying potential performance bottlenecks
Determining the optimal programming language for an algorithm
Understanding how an algorithm's runtime scales with input size
Which of the following operations typically represents constant time complexity, O(1)?
Sorting an array using bubble sort
Finding the smallest element in a sorted array
Searching for a specific value in an unsorted array
Inserting an element at the beginning of a linked list
Which sorting algorithm has a time complexity of O(n^2) in its average and worst case?
Bubble Sort
Merge Sort
Heap Sort
Quick Sort