Answers:
1. d. O(n)
2. d. O(n2)
3. a. accessing an element of an array
4. d. asymptotic analysis
5. b. hash table
1. Which of the following Big O notations is appropriate for the complexity of a search algorithm?
a. O(n2)
b. O(1)
c. O(logn)
d. O(n)
2. Which of the following Big O notations is appropriate for the complexity of a sort algorithm?
a. O(n)
b. O(1)
c. O(logn)
d. O(n2)
3. Which of the following algorithms will run in constant time?
a. accessing an element of an array
b. traversing an array
c. binary search on a sorted array
d. sorting an array
4. What is the evaluation of an algorithm’s performance and efficiency known as?
a. hash table
b. basic operations
c. solution costs
d. asymptomatic analysis
5. Which of these matches keys to values and stores and stores them?
a. simple data structure
b. hash table
c. efficiency
d. unsorted array
1 answer