CMCS 78905

subject Type Homework Help
subject Pages 12
subject Words 1415
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Let G be an undirected graph. G is called ____ if any two vertices in G are connected.
a. weakly connected
b. completely connected
c. strongly connected
d. inversely connected
The scope resolution operator is ____.
a. :
b. *
c. ::
d. ;
The output of ____ is immediately sent to the standard error stream, which is usually
the screen.
a. cerr
b. cout
page-pf2
c. cerror
d. cerrout
Because the insertion of an item might require the splitting of a node and moving the
median key to the parent node, the simplest way to implement the insertion algorithm is
to use ____.
a. recursion
b. iteration
c. inversion
d. sequential traversal
The statement ____ assigns 50 to the data member first of x.
a. x.first(50);
b. x.first = 50;
c. first(x) = 50;
d. x.value("first") = 50;
page-pf3
There are two well-known algorithms, ____ algorithm and Kruskal's algorithm, for
finding a minimum spanning tree of a graph.
a. Prim's
b. Newton's
c. Euler's
d. Orwell's
To speed up item insertion and deletion in a data set, use ____.
a. arrays
b. linked lists
c. classes
d. ADTs
page-pf4
The nodes of an ordered linked list are in ____ order.
a. descending
b. optimized
c. unknown
d. ascending
____ is the ability to use the same expression to denote different operations.
a. Overloading operators
b. Polymorphism
c. Inheritance
d. Encapsulation
The time it takes to serve a customer is the ____.
a. transaction time
b. flight time
c. request time
page-pf5
d. service time
The ____ operation checks whether the stack is empty.
a. isFullStack
b. isEmptyStack
c. peek
d. pop
In a ____, the clock is implemented as a counter and the passage of, say, 1 minute can
be implemented by incrementing the counter by 1.
a. transaction-driven simulation
b. user-driven simulation
c. time-driven simulation
d. data-driven simulation
page-pf6
To include a system-provided header file, such as iostream, in a user program, you
enclose the header file between ____.
a. curly brackets
b. angular brackets
c. asterisks
d. square brackets
The addition and deletion of elements occurs only at one end of a stack, called the ____
of the stack.
a. head
b. top
c. bottom
d. tail
page-pf7
The ____ operation on a queue inserts a copy of item into the queue.
a. front
b. back
c. pop
d. push(item)
The arguments to the constructor of a member object are specified in the ____ part of
the definition of the constructor of the class.
a. body
b. pragma
c. scope
d. heading
The shortest path algorithm, also called a greedy algorithm, was developed by Dijkstra.
page-pf8
The basic operations performed on a B-tree are search the tree, insert an item in the
tree, delete an item from the tree, and ____.
a. rotate the tree
b. balance the tree
c. traverse the tree
d. copy the tree
A client's program can include a header file via the ____ statement.
a. pragma
b. include
c. using
d. matching
page-pf9
The expression ____ returns the element at the current iterator position.
a. intVecIter
b. &intVecIter
c. *intVecIter
d. intVecIter.ref
An algorithm that finds the solution to a given problem by reducing the problem to
smaller versions of itself is called a(n) ____.
a. iterative algorithm
b. recursive algorithm
c. regressive algorithm
d. successive algorithm
A recursive function executes ____ its iterative counterpart.
a. more slowly than
b. more quickly than
page-pfa
c. at the same speed as
d. proportionately to
The function evaluateExpression evaluates each ____ expression.
a. prefix
b. postfix
c. previsit
d. inverted
In mergesort, all the comparisons are made in the method____, which merges two
sorted sublists.
a. sortList
b. divideList
c. mergeList
d. insertList
page-pfb
Assuming the priority queue is implemented as a heap, the first step is to insert the new
element in the ____ available position in the list.
a. smallest
b. largest
c. first
d. last
The two objects needed to implement a time-driven computer simulation of a queuing
system are ____.
a. the clock and the server
b. the clock and the customer
c. the clock and the queue
d. the customer and the server
page-pfc
Let G be a weighted graph, a minimum (minimal) spanning tree of G is a spanning tree
with the ____.
a. maximum weight
b. minimum weight
c. maximum height
d. minimum height
The queue operation ____ determines whether the queue is full.
a. isFullQueue
b. isNullQueue
c. queueFront
d. deleteQueue
The value of a pointer variable is an ____.
a. address
page-pfd
b. entry in a table
c. array
d. unknown value
The class linkedListType is a(n) ____ class and therefore does not implement all the
operations.
a. derived
b. partial
c. abstract
d. generic
In an array list, the time complexity of the isEmpty function is identical to the time
complexity of the ____ function.
a. removeAt
b. isFull
c. insertAt
d. print
page-pfe
Searching through a linked list or inserting an item in a linked list requires a ____ of the
list.
a. review
b. deletion
c. copying
d. traversal
A program goes through many phases from the time it is first conceived until the time it
is retired, called the life cycle of the program.
After inserting the new element in the heap, the list might no longer be a heap.
page-pff
The sequential search always starts at the last element in the list and continues until
either the item is found in the list or the entire list is searched.
To simplify operations such as insert and delete, you can define the class to implement
the node of a linked list as a struct.
In a preorder traversal of a binary tree, for each node, first the node is visited, then the
right subtree is visited, and then the left subtree is visited.
page-pf10
A binary search is very fast for array-based lists.
In the breadth first traversal algorithm, the root node is visited last.
The algorithms includes (subset), set_intersection, set_union, set_difference, and
set_symmetric_difference assume that the elements within each given range are not
sorted.
Mergesort uses the divide-and-conquer technique to sort a list.
page-pf11
In the software maintenance process, the program is modified to fix the (identified)
problems and/or to enhance it.
The copy constructor automatically executes when, as a parameter, an object is passed
by value.
The operation push removes the bottom element from the stack.
page-pf12
When writing the definition of a friend function, the name of the class and the scope
resolution operator do not precede the name of the friend function in the function
heading.
The decrement operator decrements the value of a pointer variable by the size of the
memory to which it is pointing.
Open addressing can be implemented in several ways.

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.