WGU C949 DATA STRUCTURES AND ALGORITHMS (2 VERSIONS)
- EXAMINATION COMPLETE
QUESTIONS AND DETAILED SOLUTIONS
LATEST UPDATE THIS YEAR JUST RELEASED
Question 1: A list where we start at the first node and follow the
chain of nodes iterating over each until we get to the end
Answer:
Singly Linked List
Question 2: A list that builds on the singly linked list by adding
reverse iteration.
Answer:
Doubly Linked List
Question 3: 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 4: A ______ is a container where nodes of data are linked
together into a list Linked
Answer:
List
Question 5: Linking together complex nodes into a single structure
Linked
Answer:
, List
Question 6: Each link in a chain for a linked lists is called a ______
node
Answer:
What two things do nodes contain?
Question 7: 1. the value
Answer:
2. reference to next item in the list
Question 8: Give a coded example on how to create a 3 chained
linked list of nodes. Node head = new Node(1); head.Next = new
Node(2); head.Next.Next = new Node(3);
Answer:
Give a coded example on how to create a doubly linked list
Question 9: Node node1 = new Node(1);
Answer:
Node node2 = new Node(2);
Question 10: Node node3 = new Node(3); node1.Next = node2;
node2.Previous = node1; node2.Next = node3; node3.Previous =
node2;
Answer:
, The first and last nodes of a doubly linked list should have a value of ______
null
Question 11: Adds a value to the beginning of the list
Answer:
AddHead
Question 12: Adds a value at the end of the linked list
Answer:
AddTail
Question 13: Finds the first node whose value equals the provided
argument Find
Answer:
Returns true if the specified value exists in the list, false otherwise Contains
Question 14: Removes the first node on the list whose value is
equal to the argument Remove
Answer:
A doubly linked list where the values are inserted and sorted in order Sorted
Question 15: Data Structure
Answer:
A data structure that stores subitems, with a name associated with each
subitem.
, Question 16: accessible by a positional index.
Answer:
Array
Question 17: A data structure that stores ordered list of items in
nodes, where each node stores data and has a pointer to the next
node. linked list
Answer:
A data structure in which each node stores data and has up to two children,
known as
Question 18: a left child and a right child. binary tree
Answer:
A data structure that stores unordered items by mapping (or hashing) each
item to a
Question 19: location in an array. hash table
Answer:
A functions whose cost scales linearly with the size of the input O(n)
Question 20: Iterating over a collection of data once often indicates
an ______ algorithm. (alphabet for-loop example)
Answer:
O(n)
Question 21: A functions whose cost scales logarithmically with
the input size O(log n)
- EXAMINATION COMPLETE
QUESTIONS AND DETAILED SOLUTIONS
LATEST UPDATE THIS YEAR JUST RELEASED
Question 1: A list where we start at the first node and follow the
chain of nodes iterating over each until we get to the end
Answer:
Singly Linked List
Question 2: A list that builds on the singly linked list by adding
reverse iteration.
Answer:
Doubly Linked List
Question 3: 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 4: A ______ is a container where nodes of data are linked
together into a list Linked
Answer:
List
Question 5: Linking together complex nodes into a single structure
Linked
Answer:
, List
Question 6: Each link in a chain for a linked lists is called a ______
node
Answer:
What two things do nodes contain?
Question 7: 1. the value
Answer:
2. reference to next item in the list
Question 8: Give a coded example on how to create a 3 chained
linked list of nodes. Node head = new Node(1); head.Next = new
Node(2); head.Next.Next = new Node(3);
Answer:
Give a coded example on how to create a doubly linked list
Question 9: Node node1 = new Node(1);
Answer:
Node node2 = new Node(2);
Question 10: Node node3 = new Node(3); node1.Next = node2;
node2.Previous = node1; node2.Next = node3; node3.Previous =
node2;
Answer:
, The first and last nodes of a doubly linked list should have a value of ______
null
Question 11: Adds a value to the beginning of the list
Answer:
AddHead
Question 12: Adds a value at the end of the linked list
Answer:
AddTail
Question 13: Finds the first node whose value equals the provided
argument Find
Answer:
Returns true if the specified value exists in the list, false otherwise Contains
Question 14: Removes the first node on the list whose value is
equal to the argument Remove
Answer:
A doubly linked list where the values are inserted and sorted in order Sorted
Question 15: Data Structure
Answer:
A data structure that stores subitems, with a name associated with each
subitem.
, Question 16: accessible by a positional index.
Answer:
Array
Question 17: A data structure that stores ordered list of items in
nodes, where each node stores data and has a pointer to the next
node. linked list
Answer:
A data structure in which each node stores data and has up to two children,
known as
Question 18: a left child and a right child. binary tree
Answer:
A data structure that stores unordered items by mapping (or hashing) each
item to a
Question 19: location in an array. hash table
Answer:
A functions whose cost scales linearly with the size of the input O(n)
Question 20: Iterating over a collection of data once often indicates
an ______ algorithm. (alphabet for-loop example)
Answer:
O(n)
Question 21: A functions whose cost scales logarithmically with
the input size O(log n)