Question
What will be the Big-Oh complexity to traverse a linked list? Select one: a. O(n) b. O(1) c. O(n 2 ) d. O(2 n )
What will be the Big-Oh complexity to traverse a linked list?
Select one:
a. O(n)
b. O(1)
c. O(n2)
d. O(2n)
Question 2
Question text
What is the big-o complexity of the purple line?
Select one:
a. O(n)
b. O(log n)
c. O(n)
d. O(2n)
Question 3
Question text
______ is the time complexity of an algorithm that operates in exponential time. This means that process times doubles with the addition of each data element.
Select one:
a. O(n)
b. O(log n)
c. O(n2)
d. O(2n)
Question 4
Question text
If the characters 'D', 'C', 'B', 'A' are placed in a queue (in that order), and then removed one at a time, in what order will they be removed?
Select one:
a. ABCD
b. ABDC
c. DCAB
d. DCBA
e. ACDB
Question 5
Question text
What is the big-o complexity of the blue line?
Select one:
a. O(n)
b. O(log n)
c. O(n2)
d. O(2n)
Question 6
Question text
Which method of traversal does not use stack to hold nodes that are waiting to be processed?
Select one:
a. Depth First
b. Breadth first
c. Back-tracking
d. Bounding
Question 7
Question text
What is the big-o complexity of the red line?
Select one:
a. O(n)
b. O(log n)
c. O(n)
d. O(1)
Question 8
Question text
Suppose you have a directed graph representing all the flights that an airline flies and the flying times for each connection. What algorithm might be used to find the best sequence of connections from one city to another to minimize the overall time of the flight?
Select one:
a. Breadth first search.
b. Depth first search.
c. A cycle-finding algorithm.
d. A shortest-path algorithm.
Question 9
Question text
Breadth first search __________.
Select one:
a. Scans each incident node along with its children.
b. Scans all incident edges before moving to other node.
c. Is same as backtracking.
d. Scans all the nodes in random order.
e. Scans all the nodes in pre-order manner.
Question 10
Question text
True/False: Dijkstra's algorithm finds the shortest paths in a graph from all vertices to a given vertex.
Select one:
True
False
Question 11
Question text
What is the Big-Oh complexity of the selection sort?
Select one:
a. O(n)
b. O(log n)
c. O(n2)
d. O(2n)
Question 12
Question text
What is the big-o complexity of the green line?
Select one:
a. O(n)
b. O(log n)
c. O(n log n)
d. O(2n)
Question 13
Question text
True/False: O(1) is the time complexity of an algorithm that operates in constant time. The process time required stays constant regardless of the data size.
Select one:
True
False
Question 14
Question text
_____ is the time complexity of an algorithm that operates in linear time. The process time changes in the same ratio as the data size.
Select one:
a. O(n)
b. O(1)
c. O(n)
d. O(2n)
Question 15
Question text
What will be the Big-Oh complexity to search a balanced binary tree?
Select one:
a. O(n)
b. O(log n)
c. O(n2)
d. O(2n)
Question 16
Question text
What will be the Big-Oh complexity of a linear search?
Select one:
a. O(n)
b. O(1)
c. O(n)
d. O(2n)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started