WGU C949 Data Structures and Algorithms UPDATED
ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
Question 1.
A functions whose cost scales linearly with the size of the input
ANSWER
O(n)
Question 2.
Iterating over a collection of data once often indicates an ______ algorithm. (alphabet for-loop example)
ANSWER
O(n)
Question 3.
A functions whose cost scales logarithmically with the input size
ANSWER
O(log n)
Question 4.
Which type of function works by breaking down large problem into smaller and smaller chunks?
ANSWER
O(log n)
Question 5.
As the size of the input grows the cost of the algorithm does not increase at the same rate. The overall
cost of performing an operation on 1,000,000 items is only twice that of performing the operation on
1,000 items.
ANSWER
O(log n)
,Question 6.
A function that exhibits quadratic growth relative to the input size
ANSWER
O(n^2)
Question 7.
An example of this type of function is doubly nested loop
ANSWER
O(n^2)
Question 8.
Which type of function gets really expensive really quickly?
ANSWER
O(n^2)
Question 9.
A function that has two inputs that contribute to growth
ANSWER
O(nm)
Question 10.
An example of this type of function is when there is a nested loop that iterates of two distinct
collections of data
ANSWER
O(nm)
Question 11.
Are Big-O cases used in the best or worst situations?
ANSWER
Worst
, Question 12.
Which statement is static?
readonly Contact[] contacts = new Contact[];
readonly Contact contacts = new Contacts[100];
ANSWER
readonly Contact contacts = new Contacts[100];
Question 13.
A container where data is stored in nodes consisting of a single data item and a reference to the next
node
ANSWER
Linked List
Question 14.
A ______ is a container where nodes of data are linked together into a list
ANSWER
Linked List
Question 15.
Linking together complex nodes into a single structure
ANSWER
Linked List
Question 16.
Each link in a chain for a linked lists is called a ______
ANSWER
node
ACTUAL EXAM QUESTIONS AND CORRECT ANSWERS
Question 1.
A functions whose cost scales linearly with the size of the input
ANSWER
O(n)
Question 2.
Iterating over a collection of data once often indicates an ______ algorithm. (alphabet for-loop example)
ANSWER
O(n)
Question 3.
A functions whose cost scales logarithmically with the input size
ANSWER
O(log n)
Question 4.
Which type of function works by breaking down large problem into smaller and smaller chunks?
ANSWER
O(log n)
Question 5.
As the size of the input grows the cost of the algorithm does not increase at the same rate. The overall
cost of performing an operation on 1,000,000 items is only twice that of performing the operation on
1,000 items.
ANSWER
O(log n)
,Question 6.
A function that exhibits quadratic growth relative to the input size
ANSWER
O(n^2)
Question 7.
An example of this type of function is doubly nested loop
ANSWER
O(n^2)
Question 8.
Which type of function gets really expensive really quickly?
ANSWER
O(n^2)
Question 9.
A function that has two inputs that contribute to growth
ANSWER
O(nm)
Question 10.
An example of this type of function is when there is a nested loop that iterates of two distinct
collections of data
ANSWER
O(nm)
Question 11.
Are Big-O cases used in the best or worst situations?
ANSWER
Worst
, Question 12.
Which statement is static?
readonly Contact[] contacts = new Contact[];
readonly Contact contacts = new Contacts[100];
ANSWER
readonly Contact contacts = new Contacts[100];
Question 13.
A container where data is stored in nodes consisting of a single data item and a reference to the next
node
ANSWER
Linked List
Question 14.
A ______ is a container where nodes of data are linked together into a list
ANSWER
Linked List
Question 15.
Linking together complex nodes into a single structure
ANSWER
Linked List
Question 16.
Each link in a chain for a linked lists is called a ______
ANSWER
node