-
-
In an array queue, data is stored in an _____ element.
Skill/Topic: Queues Using Linked ListsA) NodeB) linked listC) arrayD) constructorExplanation: In an array queue, data is stored in an array element. In a linked list queue, data is stored in a node of a linked list
-
A _______ is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
Skill/Topic: Queues Using Linked ListsA) queue linked listB) stacks linked listC) both of themD) neither of themExplanation: A queue linked list is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.
-
Which node is removed from the queue when the dequeue() member method is called?
Skill/Topic: Queues Using Linked ListsA) The node at the front of the queue is removed when the dequeue() member method is called.
-
_______ form of access is used to add and remove nodes from a queue.
Skill/Topic: Queues Using Linked ListsA) FIFO , First In First Out
-
QueueLinkedList class inherit the LinkedList class.
Skill/Topic: Queues Using Linked ListsA) TrueB) False
-
Why does QueueLinkedList class inherit the LinkedList class?
Skill/Topic: Queues Using Linked ListsA) The QueueLinkedList class inherits the LinkedList class because the LinkedList class contains data members and function members that are necessary to manage the linked list that is used for the queue.
-
The removeNode() requires a reference to the node that is to be removed.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
DeleteNode() function requires the _____ of the data element of the node that is being removed.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) referenceB) valueC) declarationD) variable
-
What is the return value of the findNode() function?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) The return value of the findNode() function is the index position of the node.
-
The insertNodeAt() function specifies the index of where to insert the new node into the linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
The appendNode() function appends the new node to the list along with the programmer specifing where to place the new node in the linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) FalseExplanation: The appendNode() function appends the new node to the list without requiring the programmer to specify where to place the new node in the linked list.
-
What happens if an invalid index value is passed to a function?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) If an invalid index is passed, the function terminates without further processing. [Explanation] Functions that use an index value always determine if the index passed to them is valid before using the index value . If an invalid index is received, the
-
Why is it important to enhance the functionality of the LinkedList class?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) You enhance the functionality of LinkedList class to more easily manipulate a linked list
-
The LinkedList class is defined in the _______ package.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) java.util
-
The _______ function retrieves the value of the size member of the LinkedList class.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) getSize()B) giveSize()C) seeSize()D) addSize()Explanation: The getSize() function retrieves the value of the size member of the LinkedList class. The getSize() function contains one statement that simply returns the value of the size member
-
The insertNodeAt() function places a new node at a specific location in the linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
The removeNodeAt() function removes a node by using the node’s index?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) FalseExplanation: The removeNodeAt() function removes a node by using the node’s index rather than the reference to the node in memory
-
What is a Tree?
Skill/Topic: TreeA) A tree is a data structure where data is stored in nodesExplanation: A tree is a data structure where data is stored in nodes. Nodes are arranged in branches where each node can expand into 0, 1, or 2 other nodes.
-
A parent node is a node that branches into one or two other nodes, which are called child nodes.
Skill/Topic: TreeA) TrueB) False
Data Structures Interview Questions
Ans