Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1 A ____ is a set of elements of the same type in which the elements ar

ID: 645487 • Letter: Q

Question

Question 1

A ____ is a set of elements of the same type in which the elements are added at one end.

hash table

tree

queue

2 points

Question 2

A sequential search assumes that the data is in a particular order.

True

False

2 points

Question 3

After inserting (or deleting) a node from an AVL tree, the resulting binary tree does not have to be an AVL tree.

True

False

2 points

Question 4

From the binary search algorithm, it follows that every iteration of the while loop cuts the size of the search list by half.

True

False

2 points

Question 5

____ are systems in which queues of objects are waiting to be served by various servers

Queuing networks

Queuing systems

Holding systems

2 points

Question 6

The expression vecCont.empty() empties the vector container of all elements.

True

False

2 points

Question 7

Indirect recursion requires the same careful analysis as direct recursion.

True

False

2 points

Question 8

A linked list in which the last node points to the first node is called a reverse linked list.

True

False

2 points

Question 9

The ____ operation on a queue returns the last element in the queue, but does not remove the element from the queue

front

back

pop

push

2 points

Question 10

A class and its members can be described graphically using a notation known as Unified Modeling Language (UML) notation.

True

False

2 points

Question 11

Every customer has a customer number, arrival time, waiting time, transaction time, and departure time.

True

False

2 points

Question 12

A B-tree can be ____ in three ways: inorder, preorder, and postorder.

copied

reversed

traversed

2 points

Question 13

The algorithm ____ is used to find the elements in one range of elements that do not appear in another range of elements.

set_union

set_difference

set_join

2 points

Question 14

A convenient and fast way to implement an associative container data structure is to use a ____.

linked list

binary search tree

priority queue

2 points

Question 15

The statement ____ declares intList to be a vector and the component type to be int

vector intList;

int.vector intList;

int.vector intList;

2 points

Question 16

Class objects cannot be passed as parameters to functions or returned as function values.

True

False

2 points

Question 17

To simplify operations such as insert and delete, you can define the class to implement the node of a linked list as a struct.

True

False

2 points

Question 18

The function that overloads any of the operators (), [], ->, or = for a class must be declared as a member of the class.

True

False

2 points

Question 19

Assuming deq is a deque object, the expression deq.push_front(elem) deletes the first element from deq.

True

False

2 points

Question 20

Assuming vecList is a vector container, the expression ____ deletes all elements from the container.

vecList.erase(position)

vecList.erase(beg, end)

vecList.clear()

2 points

Question 21

The ____ operation is used to add an element onto the stack.

push

pop

add

2 points

Question 22

The order of the nodes in a linked list is determined by the data value stored in each node.

True

False

2 points

Question 23

A binary search can be performed only on ____.

ordered lists

comparable lists

unordered lists

2 points

Question 24

The syntax for accessing a class (struct) member using the operator -> is ____.

pointerVariableName.classMemberName

pointerVariableName->classMemberName

&pointerVariableName.classMemberName

2 points

Question 25

When an integer is subtracted from a pointer variable, the value of the pointer variable is decremented by the integer times half the size of the memory to which the pointer is pointing.

True

False

2 points

Question 26

In a ____ queue, customers or jobs with higher priorities are pushed to the front of the queue.

structured

divided

priority

2 points

Question 27

If we compare the push function of the stack with the insertFirst function for general lists, we see that the algorithms to implement these operations are similar.

True

False

2 points

Question 28

To speed up item insertion and deletion in a data set, use ____.

arrays

linked lists

classes

2 points

Question 29

An ____ is an object that produces each element of a container, such as a linked list, one element at a time.

initiator

iterator

interpreter

2 points

Question 30

The ____ algorithm tries to extend a partial solution toward completion

backtracking

recursive

backordering

2 points

Question 31

    complexity of the function seqSearch in an array list is O(n2).

True

False

2 points

Question 32

A queuing system only consists of queues of objects waiting to be served.

True

False

2 points

Question 33

Mergesort uses the divide-and-conquer technique to sort a list.

True

False

2 points

Question 34

Building a linked list forward places the new item to be added at the beginning of the linked list.

True

False

2 points

Question 35

In the second form of ____, the binary operation op is applied to the elements in the range.

adjacent_find

adjacent_difference

adjacent_member

2 points

Question 36

Open addressing can be implemented in several ways.

True

False

2 points

Question 37

A(n) ____ is a data type that separates the logical properties from the implementation details.

public

abstract data type

private

2 points

Question 38

Using static arrays, depending on the number of servers specified by the user, a list of servers is created during program execution.

True

False

2 points

Question 39

The operation ____ is used to remove the top element from the stack.

pop

push

peek

2 points

Question 40

The ____ in a binary tree is the number of branches on the path from the root to the node.

size of a node

level of a node

depth of a node

2 points

Question 41

Because an AVL tree is a binary search tree, the search algorithm for an AVL tree is the same as the search algorithm for a binary search tree.

True

False

2 points

Question 42

In an array list the time complexity of the remove function is identical to the time complexity of the ____ function.

insert

isEmpty

isFull

2 points

Question 43

The general case in a recursive function is the case for which the solution is obtained directly.

True

False

2 points

Question 44

In 1736, Euler represented the Knigsberg bridge problem as a graph, marking (as recorded) the birth of graph theory.

True

False

2 points

Question 45

We need ____ pointers to build a linked list.

two

three

four

five

2 points

Question 46

Every call to a recursive function has its own code and its own set of ____ and local variables

headers

parameters

stack

2 points

Question 47

The term asymptotic means the study of the function f as n becomes larger and larger without bound.

True

False

2 points

Question 48

The destructor automatically executes when the class object goes out of ____.

scope

use

phase

2 points

Question 49

If the data needs to be processed in a First In First Out (FIFO) manner, we typically use a(n) ____.

stack

queue

map

2 points

Question 50

Random access iterators are ____ iterators that can randomly process elements of a container.

input

forward

bidirectional

A.

hash table

B.

tree

C.

queue

Explanation / Answer

Question 1:

A queue is a set of homogeneous elements. Which are added at the end called rear and delete the element at front.

Thus the correct answer is (C) Queue.

Question 2:

A sequential search does not assume that the data is in a particular order. It performs search on unordered lists. Binary search used to perform the search on ordered lists.

Thus the correct answer is False

Question 3:

After inserting (or deleting) a node from an AVL tree, the resulting binary does not have to be an AVL tree. Because type of rotation depends on the new balancing factor at the left or right child.

Thus the correct answer is True

Question 4:

Binary search algorithm follows every iteration of the while-loop cuts the size of the search list by half. Every iteration of while-loop makes two key comparisons to determine whether the element is in list or not.

Thus the correct Answer is True

Question 5:

Queuing systems, in which queues of objects are waiting to be served by various servers. Application of Queue is simulation technique, in which one system models the behavior of another system.

Thus the correct answer is (B) Queuing systems.

Question 6:

VecCont.empty( ) does not delete the elements from the vector. It returns Boolean value true, if the vector is empty. Otherwise returns false.

Thus the correct answer is False.

Question 7:

Recursion defines that a function which calls itself or alternate to the iteration. Indirect recursion requires same careful analysis as direct recursion. Because tracing through indirect recursion is a complex process.

Thus the correct answer is True

Question 8:

A linked list in which the last node point to the first node is not a reverse Linked list. It is Circular Linked List.

Thus the correct answer is False.

Question 9:

In Queue data structure back operation on queue returns the last element in the queue, but does not remove the element from the queue.

Thus the correct answer is (B) back.

Question 10:

A class and it members can be describes graphically using a notation known as Unified modelling notation. UML is standard visualizing modelling languages, which is used to modelling the business or analysis, document the design and implements of the software based systems.

Thus the correct answer is True.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote