QUESTIONS AND CORRECT ANSWERS
Record - CORRECT ANSWER stores sub-items, often called fields, with a name
associated with each subitem
Array - CORRECT ANSWER stores an ordered list of items, each item accessible by a
positional index
Linked list - CORRECT ANSWER stores ordered list of items in nodes, each node has
a pointer to the next
Binary tree - CORRECT ANSWER each node stores data and has up to 2 children (left
and right)
Hash table - CORRECT ANSWER stores unordered items by mapping (or hashing)
each item to a location in an array
T or F : A linked list stores items in an unspecific order - CORRECT ANSWER False
Inserting an item at the end of a 999-item array requires how many items to be shifted? -
CORRECT ANSWER 0
Inserting an item at the end of a 999-item linked list requires how many items to be shifted? -
CORRECT ANSWER 0
Inserting an item at the beginning of a 999-item array requires how many items to be shifted?
- CORRECT ANSWER 999
Inserting an item at the beginning of a 999-item linked list requires how many items to be
shifted? - CORRECT ANSWER 0
, The algorithm to append an item to an array determines what? - CORRECT
ANSWER the current size, increases the array size by 1, and assigns the new item as
the last array element
The algorithm to append an item to a linked list: - CORRECT ANSWER points the tail
node's next pointer and the list's tail pointer to the new node
Abstract data type (adt) - CORRECT ANSWER creation and update are constrained to
specific well-defined operations
Information hiding (encapsulation) - CORRECT ANSWER a key ADT aspect wherein
the internal implementation of an ADT's data and operations are hidden from the ADT user
ADT's public members define: - CORRECT ANSWER the interface for using ADT
ADT's implementation consists of: - CORRECT ANSWER private data and operations
that hidden from the user
Append(list, 11)
Append(list, 4)
Append(list, 7) - CORRECT ANSWER 11,4,7
Remove(list, item 2) from 2, 20, 30 - CORRECT ANSWER 20, 30
ADT: List - CORRECT ANSWER holds ordered data (array, linked-list)
ADT: Dynamic array - CORRECT ANSWER holds ordered data and allows indexed
access (array)