-
How is the front of the queue calculated ?
Skill/Topic: QueueA) The front of the queue is calculated by front = (front+1) % size
-
The last member function is _____________.
Skill/Topic: Linked ListA) appendNode()B) destroyList()C) displayNode()D) structNode()Explanation: destroyList()is the last memeber function and is called to remove the instance of the LinkedList from memory.
-
Look at the following example LinkedList(){ front = NULL; back = NULL;}In this example, Both the front and back pointers are assigned a NULL value.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: In this example of a the LinkedList constructor , Both the front and back pointers are assigned a NULL value.The purpose of the constructor in the linked list example is to initialize the front and back pointers as shown in the following definition. Both the front and back pointers are assigned a NULL value, which is used by the appendNode() member...
-
What is the use of displayNodesReverse() member function?
Skill/Topic: Linked ListA) The displayNodesReverse() member function displays the contents of a linked list in reverse order, beginning with the node at the back of the linked list and continuing until the first node is displayed
-
A doubly linked list is a linked list consisting of nodes that have both the previous and next elements.
Skill/Topic: Linked ListA) TrueB) False
-
Astack is a data structure that organizes data similar to how you organize dishes in a stack on your kitchen counter.
Skill/Topic: Stacks using Linked ListA) TrueB) False
-
Why is the constructor of the StackLinkedList class empty?
Skill/Topic: Stacks using Linked ListA) The constructor of the StackLinkedList class is empty because the constructor of the LinkedList class is called when an instance of the StackLinkedList class is declared. The constructor of the LinkedList class initializes the node and attributes that are
-
Why is the destructor of the StackLinkedList class empty?
Skill/Topic: Stacks using Linked ListA) The destructor of the StackLinkedList class is empty because the destructor of the LinkedList class is called prior to the destructor of the StackLinkedList class. This is because the LinkedList class is inherited by the StackLinkedList class.
-
__________ file contains the actual stack application.
Skill/Topic: Stacks using Linked ListA) StackLinkedListDemo.cpp
-
The isEmpty () member function must determine if the stack is empty.
Skill/Topic: Stacks using Linked ListA) TrueB) FalseExplanation: The pop () member function must determine if the stack is empty
-
-
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.
Data Structures Interview Questions
Ans