-
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
-
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.
-
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.
-
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...
-
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
-
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.
-
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
-
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
-
Parent Node is also called as _____ Node.
Skill/Topic: TreeA) MainB) RootC) BranchD) Stem
-
The depth of a tree is the _______ of a tree.
Skill/Topic: TreeA) number of nodes on the treeB) number of levels of a treeC) Number of branches
-
What is a leaf node?
Skill/Topic: TreeA) A leaf node is the last node on a branch
-
A stack-linked list is a data structure that uses a ______ to create a stack.
Skill/Topic: Stacks using Linked ListA) Linked ListB) QueueC) Doubly linked list
-
A hashtable is a table in which each entry consists of a hashed key and a value.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: The hashed key retrieves entries
-
-
What is a user-defined data type?
Skill/Topic: Variables and PointersA) A user-defined data type is a group of primitive data types defined by the programmer.
-
How many parts are there in a declaration statement?
Skill/Topic: Variables and PointersA) 1B) 2C) 3D) 4
-
Data members of the Hashtable class stored in the private access specifier.
Skill/Topic: Hash TableA) private access specifierB) Public access specifierC) common access specifier
-
An application iterates the hashtable by calling the ______ and ______ member functions.
Skill/Topic: Hash TableA) hasNext() and getNextKey()Explanation: An application iterates the hashtable by calling the hasNext() and getNextKey() member functions. These two functions are used together with initIterator() to retrieve all the keys from a hashtable
-
An array is a way to reference a series of memory locations using the ______.
Skill/Topic: ArrayA) Same nameB) different nameC) Multiple namesD) Unique nameExplanation: An array is a way to reference a series of memory locations using the same name. Each memory location is represented by an array element. An array element is similar to one variable except it is identified by an index value instead of a name.
Data Structures Interview Questions
Ans