-
A parent node is a node that branches into one or two other nodes, which are called child nodes.
Skill/Topic: TreeA) TrueB) False
-
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.
-
The size of an array queue can change during runtime?
Skill/Topic: Queues Using Linked ListsA) TrueB) FalseExplanation: The size of an array queue is set at compile time and cannot change at runtime
-
New nodes are added to the _____ of the queue.
Skill/Topic: Queues Using Linked ListsA) frontB) backC) middleExplanation: New nodes are added to the back of the queue.
-
LinkedList.h file is the header file that contains the definition of the Node structure and the definition of the LinkedList class.
Skill/Topic: Stacks using Linked ListA) TrueB) False
-
Linked list C++ application is organized into three files.They are _____, ______ and _____.
Skill/Topic: Linked ListA) header file , source code file , application fileExplanation: The first file is the header file that contains the definition of the NODE structure and the LinkedList class definition. The second file is a source code file containing the implementation of member functions of the LinkedList class. The last file is the application file that contains code that creates and uses...
-
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.
-
The destructor is responsible for allocating all the memory that was allocated for the linked list.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: The destructor is responsible for de-allocating all the memory that was allocated for the linked list.
-
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
-
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 a linked list?
Skill/Topic: Linked ListA) A linked list is a data structure consisting of elements called nodes. Each node points to the next and the previous node, thereby linking nodes together to form a linked list.
-
The dequeue process removes data from the front of the queue.
Skill/Topic: QueueA) TrueB) False
-
The isFull() member method is called within the enqueue process to determine ?
Skill/Topic: QueueA) if there is room to place another item in the queue.B) if there is an item in the queue to be removedC) if there is an item in the queue to be locked
-
What is a queue ?
Skill/Topic: QueueA) A Queue is a sequential organization of data.
-
What is the purpose of the isEmpty() member method?
Skill/Topic: Stacks using an ArrayA) The isEmpty() member method determines if a value is at the top of the stack and is called before an attempt is made to remove the value
-
Popping removes an item from the stack.
Skill/Topic: Stacks using an ArrayA) TrueB) FalseExplanation: Popping is the reverse process of pushing: it removes an item from the stack. It is important to understand that popping an item off the stack doesn’t copy the item. Once an item is popped from the stack, the item is no longer available on the stack, although the value remains in the array
-
_________ method places a value onto the top of a stack.
Skill/Topic: Stacks using an ArrayA) push() member methodB) pop() member methodC) isFull() member methodD) isEmpty() member methodExplanation: Push is the direction that data is being added to the stack. push() member method places a value onto the top of a stack.
-
Allocating memory at runtime is also called as?
Skill/Topic: ArrayA) Statically allocating memoryB) Dynamically allocating memoryC) Sequentially allocating memoryD) All of the aboveExplanation: Allocating memory at runtime is called a dynamically allocating memory. In this,you dynamically allocate memory by using the new operator when declaring the array, for example:int grades[] = new int[10];
-
The symbol * is also called as _________________.
Skill/Topic: Variables and PointersA) pointer dereferencing operatorExplanation: (sometimes called as dereferencing operator)
-
Pointer to a pointer is used in a program to ?
Skill/Topic: Variables and PointersA) arrange data by moving data in memoryB) arrange data by moving pointer in memoryC) arrange data without having to move data in memory.D) None of the aboveExplanation: Pointer to a pointer is used in a program to arrange data without having to move data in memory.
Data Structures Interview Questions
Ans