WGU C949 EXAM STUDY QUESTIONS AND
CORRECT ANSWERS!!
What does Append(list, x) do to a list?
Inserts x at the end of the list
What does Prepend(list, x) do to a list?
Inserts x at the start of the list
What does Remove(list, x) do to a list?
Removes x from the list
What does Sort(list) do to a list?
Sorts the lists items in ascending order
What does isEmpty(list) do to a list?
Returns true if list has no items
What is a positional list?
A list where elements contain pointers to the next and/or previous elements in the list. (Singly-
Linked & Doubly-Linked)
Which Python list function removes the first instance of the specified element?
remove()
Which component of a case statement would be considered a fall back in case no other
parameters are met?
Default
Which format is used to store data in a hash table?
Array
Which term refers to a data structure that groups related items of data together?
, Record
What would be the best data structure for a hash table with simple chaining?
A doubly linked list
Which characteristic of an algorithm is independent in nature?
Uses an agnostic code repository
Which search algorithm has the best performance when the data set is sorted?
Interval Search
What operation insert an item on the top of the stack?
Push()
What operation removes and returns the item at the top of the stack?
Pop()
How can a stack be implemented?
Linked list, an array, or a vector
What does the Peek() operation do?
It returns but does not remove an item at the top of the stack
What operation returns true if the stack has no items?
IsEmpty(stack)
Which operation should usually be preceded by a check that the stack is not empty?
Pop should not be applied to an empty stack (nor should Peek); the behavior may be undefined.
In contrast, Push indeed can be applied to an empty stack, to insert the stack's first item.
What data structure/s can a queue be implemented as?
A linked list or an array
What operation insert an item at the end of the queue?
CORRECT ANSWERS!!
What does Append(list, x) do to a list?
Inserts x at the end of the list
What does Prepend(list, x) do to a list?
Inserts x at the start of the list
What does Remove(list, x) do to a list?
Removes x from the list
What does Sort(list) do to a list?
Sorts the lists items in ascending order
What does isEmpty(list) do to a list?
Returns true if list has no items
What is a positional list?
A list where elements contain pointers to the next and/or previous elements in the list. (Singly-
Linked & Doubly-Linked)
Which Python list function removes the first instance of the specified element?
remove()
Which component of a case statement would be considered a fall back in case no other
parameters are met?
Default
Which format is used to store data in a hash table?
Array
Which term refers to a data structure that groups related items of data together?
, Record
What would be the best data structure for a hash table with simple chaining?
A doubly linked list
Which characteristic of an algorithm is independent in nature?
Uses an agnostic code repository
Which search algorithm has the best performance when the data set is sorted?
Interval Search
What operation insert an item on the top of the stack?
Push()
What operation removes and returns the item at the top of the stack?
Pop()
How can a stack be implemented?
Linked list, an array, or a vector
What does the Peek() operation do?
It returns but does not remove an item at the top of the stack
What operation returns true if the stack has no items?
IsEmpty(stack)
Which operation should usually be preceded by a check that the stack is not empty?
Pop should not be applied to an empty stack (nor should Peek); the behavior may be undefined.
In contrast, Push indeed can be applied to an empty stack, to insert the stack's first item.
What data structure/s can a queue be implemented as?
A linked list or an array
What operation insert an item at the end of the queue?