COMPSCI 22874

subject Type Homework Help
subject Pages 13
subject Words 1407
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Like function templates, ____ are used to write a single code segment for a set of
related classes.
a. function types
b. class templates
c. inherited classes
d. protected members
In the function ____, the growth rate is exponential.
a. g(n)=1
b. g(n)=n2
c. g(n)=nlog2n
d. g(n)=2n
A ____ is a set of servers.
a. server list
b. customer list
page-pf2
c. data list
d. queue list
A(n) ____ is a step-by-step problem-solving process in which a solution is arrived at in
a finite amount of time.
a. design plan
b. algorithm
c. process plan
d. structured program
To ensure that the largest element of the priority queue is always the first element of the
queue, we can implement priority queues as ____.
a. piles
b. stacks
c. trees
d. heaps
page-pf3
In the ____ method, if a collision occurs with the hash function h, we use a series of
hash functions, h1, h2, . . ., hs.
a. overhashing
b. recomputing
c. rehashing
d. precomputing
The * is commonly referred to as the ____ operator.
a. referencing
b. allocating
c. dereferencing
d. addressing
page-pf4
The ____ provides class templates to process lists (contiguous or linked), stacks, and
queues.
a. STL
b. ITL
c. CTL
d. ADL
A stack is a ____ data structure.
a. FIFO
b. LIFO
c. FILO
d. LILO
The function members of the class describe the properties of the objects, and the class
page-pf5
variables describe the actions on that data.
A sorting algorithm makes key comparisons and also moves the data.
You can initialize a pointer variable by setting it to ____.
a. EMPTY
b. NULL
c. INIT
d. NONE
Even though we don"t need to write program statements to allocate and deallocate
page-pf6
memory, ____ is associated with executing a recursive function, both in terms of
memory space and execution time.
a. overburden
b. compiler interpretation
c. overhead
d. code interpretation
In a(n) ____, a list is sorted by selecting elements in the list, one at a time, and moving
them to their proper positions.
a. quicksort
b. insertion sort
c. selection sort
d. bubble sort
A linked list is a collection of ____.
a. classes
b. nodes
page-pf7
c. addresses
d. memory variables
If the hash function causes a cluster at a particular home position and the cluster
remains under these probings, it is called ____.
a. primary clustering
b. secondary clustering
c. tertiary clustering
d. random clustering
The statement ____ declares graphIt to be an iterator.
a. linkedListIterator graphIt<int>;
b. linkedListIterator<int> graphIt;
c. linkedListIterator.int graphIt;
d. linkedListIterator<int> graphIt<int>;
page-pf8
In the Tower of Hanoi problem, it would take about ____ years for the computer to
generate 264 moves at the rate of 1 billion moves per second.
a. 5
b. 50
c. 500
d. 5,000
In a directed graph, the edges are drawn using ____.
a. lines
b. circles
c. arrows
d. triangles
page-pf9
One of the drawbacks of linked lists is that they must be processed ____.
a. recursively
b. in order
c. out of order
d. sequentially
With the help of the ____, two values can be combined into a single unit and, therefore,
can be treated as one unit.
a. class tuple
b. class unit
c. class pair
d. class double
In the second form of ____, the binary operation op is applied to the elements in the
range.
a. adjacent_find
page-pfa
b. adjacent_connect
c. adjacent_member
d. adjacent_difference
With selection sort, we can keep track of the unsorted portion of the list and repeat the
steps involved with sorting with the help of a ____ loop.
a. when
b. for
c. while
d. do
The queue operation ____ returns the first element of the queue.
a. tail
b. insert
c. front
d. delete
page-pfb
When a program is considered too expensive to maintain, the developer might decide to
____ the program and no new version of the program will be released.
a. delete
b. restructure
c. retire
d. release
In a deep copy, two or more pointers have their own data.
An ____ is a tree in which each node has at most m children.
a. m-way search tree
page-pfc
b. m-level search tree
c. m-node search tree
d. m-height search tree
A function can return two values by using the ____.
a. class tuple
b. class pair
c. class double
d. class unit
In addition to the nature of the solution, ____ is the other key factor in determining
whether recursion or iteration is the better approach.
a. latitude
b. elegance
c. efficacy
d. efficiency
page-pfd
The function ____ searches the binary search tree for a given item.
a. insert
b. search
c. replace
d. traverse
The header node is placed at the ____ of a list.
a. middle
b. end
c. beginning
d. key location
page-pfe
In an array list, the time complexity of the removeAt function is identical to the time
complexity of the ____ function.
a. isEmpty
b. seqSearch
c. isFull
d. isItemAtEqual
Logically, you can think of a recursive function as having an unlimited number of
copies of itself.
The same probe sequence is used for two nonidentical keys because random probing
and quadratic probing are functions of the original key.
page-pff
In breadth first traversal, starting at the first vertex, the graph is traversed as little as
possible.
It is possible to design Prim's algorithm so that it is of the order O(n2).
The time complexity of the function isEmpty in an array list is O(1).
The function copy can perform only one operation, which is to output the elements of a
container.
page-pf10
A linked list is a random access data structure.
The statements vecList.at(index) and vecList[index] return different values.
The components of a class are called objects.
page-pf11
A graph G has a spanning tree if and only if G is connected; from this it follows that to
determine a spanning tree of a graph, the graph must be connected.
After inserting an item in a binary search tree, the resulting binary tree must also be a
binary search tree.
In C++, the array index starts at 0.
In this chapter, the class that implements a list of servers has three member variables.
page-pf12
A new item can be inserted at the beginning of the linked list because the data in a
linked list is in no particular order.
The ampersand, &, is a binary operator that returns the address of its operand.
The execution of the recursive version of the program to calculate a Fibonacci number
is as efficient as the execution of the nonrecursive version.
Algorithms are class templates.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.