-
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 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
-
The LinkedList class is defined in the _______ package.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) java.util
-
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.
-
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.
-
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 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 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
-
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...
-
_______ form of access is used to add and remove nodes from a queue.
Skill/Topic: Queues Using Linked ListsA) FIFO , First In First 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.
-
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
-
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
-
A value is also a component of a node that is used to store data.
Skill/Topic: TreeA) TrueB) False
-
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.
-
The java.util package contains two classes that are designed to work with hashtables. They are _______ and _________.
Skill/Topic: Hash TableA) Hashtable , HashMap class
-
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
-
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 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
-
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