Skill/topic: hash tablea) a hash number key to a keyb) key to a hash number keyc) a key to an indexexplanation: the hashstring() member function is another function called by other member functions of the hashtable class whenever a function needs to convert a key to a hash number key. The hashstring()...
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
To increase the efficiency of the linkedliss class and to allow easy manipulations on the linked list we should enhance the functionality of the class.
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
True, the removenodeat() function removes a node by using the nodes index and not by the the reference to the node in memory.
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 hash number resulted from hashing is 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 size of the array of pointers (tablesize) is passed to the constructor when the application declares an instance of the Hashtable class and therefore the constructor of the hashtable class initializes data members and creates the hashtable.
The linkedlist class is defined in the _______ package.
Skill/topic: stacks and queues: insert, delete, peek, finda) Java.Util
The linkedlist class is defined in the java.util package.
Skill/topic: stacks and queues: insert, delete, peek, finda) trueb) false
True,insertnodeat() function specifies the index where to insert the new node in the linked list.
Conceptually, a linked list queue is the same as a queue built using an array.
Skill/topic: queues using linked listsa) trueb) falseexplanation: conceptually, a linked list queue is the same as a queue built using an array. Both store data. Both place data at the front of the queue and remove data from the front of the queue
A queue built using array is same as a linked list queue because both insert the data in the front and delete the data from front of the queue,i.e,both follow fifo data structure.
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.
No,the appendNode() function do append the new node at the programmers specified place instead it appends the new node at the tail of the linked list instead of head.If the likt is empty then it uses reference pointer to change the head pointer.
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 destructor of the LinkedList class is called before the destructor of the StackLinkedList class. The LinkedList class constructor deletes all memory that is associated with the nodes of the linked list. Therefore, the destructor of the StackLinkedList class is empty.
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
The constructor is empty because the constructor of the LinkedList class is called before the constructor of the StackLinkedList class,we know that the StackLinkedList class inherits the LinkedList cl...
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.
True,as the linkedlist class contains the functions and data members which are used to manage the linked list which is used for the queues,hence queuelinkedlist class inherit the linkedlist class.
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
The hash table applications of java are simpler then c++ because java defines a class in java collection class called HASHTABLE class which is present 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...
True,GetSize() function is used to protect the integrity of the Data by controlling the access to the size parameter, such that only the function members of the hashtable can access the size parameter.
_______ form of access is used to add and remove nodes from a queue.
Skill/topic: queues using linked listsa) fifo , first in first out
Queues are first in first out form of data structures.In a FIFO data structure, the first element added to the queue will be the first one to be removed.
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 dequeue() function is used to remove the node at the front and returns a value, this value is stored in an item.
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
False.
The pop() function determine whether the stack is empty or not by calling the isEmpty() member function..
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 data model provides unique keys as a component of the node which identifies the node.
A value is also a component of a node that is used to store data.
Skill/topic: treea) trueb) false
True, a value is also a component of a node which is used to store data.
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.
False.
The key entered must be hashed before an application compares it with the hash key table.
The hashString() member function is called by other member functions of the Hashtable class whenever a function needs to convert a key to hash number key.