-
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
-
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.
-
What happens if an invalid index value is passed to a function?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) If an invalid index is passed, the function terminates without further processing. [Explanation] Functions that use an index value always determine if the index passed to them is valid before using the index value . If an invalid index is received, the
-
Why is it important to enhance the functionality of the LinkedList class?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) You enhance the functionality of LinkedList class to more easily manipulate a linked list
-
The LinkedList class is defined in the _______ package.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) java.util
-
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 insertNodeAt() function places a new node at a specific location in the linked list.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
-
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
-
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
-
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
-
What is hashing?
Skill/Topic: Hash TableA) Hashing is the technique of scrambling bits of a key into a hash number.
-
Why is it necessary to hash?
Skill/Topic: Hash TableA) Hashing assures that the format of keys is uniform and unique
-
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
-
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.
-
How is a key hashed?
Skill/Topic: Hash TableA) A hash key is created by bit shifting a hashed value and then adding to the value bits of a character of the key entered by the application
-
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.
-
_____ is the common programming technique used for hashing in all hashing functions.
Skill/Topic: Hash TableA) Bit Shifting
-
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
Data Structures Interview Questions
Ans