-
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
-
C program to print the information from each node in reverse order.
Write a C program to print the information from each node in reverse order in doubly linked list, in which pointer to last node is TAIL.
-
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 java.util package contains two classes that are designed to work with hashtables. They are _______ and _________.
Skill/Topic: Hash TableA) Hashtable , HashMap class
-
A key entered by an application be directly compared to a key in a hashtable.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: No. A key entered by the application must be hashed before it can be compared to a key in the hashtable.
-
A value is also a component of a node that is used to store data.
Skill/Topic: TreeA) TrueB) False
-
A ______ is a component of a node that identifies the node.
Skill/Topic: TreeA) ValueB) TreeC) KeyD) IndexExplanation: A key is a component of a node that identifies the node. An application searches keys to locate a desired node
-
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
-
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
-
GetSize() function is used to protect the integrity of the Data.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: The getSize() member function of the Hashtable class reads the size data member of the Hashtable class and returns its value to the statement that calls the getSize() function. If you gave the application direct access to the size data member, statements within the application could assign an incorrect value to size. By controlling access to size to...
-
The C++ version of the hashtable application is simpler than the Java version.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: The Java version of the hashtable application is simpler than the C++ version because the Java version defines the Hashtable class in the Java Collection Classes that are defined in the java.util package
-
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.
-
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.
-
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.
-
The LinkedList class is defined in the _______ package.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) java.util
-
The constructor of the Hashtable class initializes data members and creates the hashtable.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: The constructor of the Hashtable class initializes data members and creates the hashtable. The size of the array of pointers (tablesize) is passed to the constructor when the application declares an instance of the Hashtable class
-
Hashing results in a hash number that has great significance.
Skill/Topic: Hash TableA) TrueB) FalseExplanation: Hashing results in a hash number that has no real significance beyond it being used as the key for an entry.
-
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
Data Structures Interview Questions
Ans