CMCS 27681

subject Type Homework Help
subject Pages 15
subject Words 1535
subject Authors D. S. Malik

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
____ is when more and more new keys would likely be hashed to the array slots that are
already occupied.
a. Globbing
b. Adjacency
c. Clustering
d. Affinity
The ____ contains algorithms that only look at the elements in a container and that
move the elements of a container.
a. ATL
b. DTL
c. ASTL
d. STL
If the item to be inserted in an AVL tree is already in the tree, the search ends at a ____.
a. leaf node
b. linear subtree
page-pf2
c. linked subtree
d. nonempty subtree
In computer simulation, the objects being studied are usually represented as ____.
a. data structures
b. processes
c. programs
d. data
The worst-case behavior of quicksort is ____.
a. O(n)
b. O(nlogn)
c. O(1)
d. O(n2)
page-pf3
The three fundamental stages a program goes through are: development, use, and ____.
a. implementation
b. maintenance
c. analysis
d. requirements gathering
In an array list the time complexity of the remove function is identical to the time
complexity of the ____ function.
a. insert
b. isEmpty
c. isFull
d. maxListSize
page-pf4
Let G be a weighted graph, let u and v be two vertices in G, and let P be a path in G
from u to v. The weight of the path P is the ____ of all the edges on the path P.
a. sum of the edges
b. product of the weights
c. sum of the weights
d. product of the edges
Building a linked list forward places the item to be added at the ____ of the linked list.
a. beginning
b. end
c. middle
d. key point
Given a pointer to a list, the function ____ prints the elements of the list in reverse
order.
a. reverse
b. reversePrint
page-pf5
c. invert
d. translate
The ____ attempts to find solutions to a problem by constructing partial solutions and
making sure that any partial solution does not violate the problem requirements.
a. backtracking algorithm
b. inferring algorithm
c. interpretation algorithm
d. stack tracing algorithm
The algorithm ____ is used to manipulate the elements of two ranges.
a. inner_product
b. outer_product
c. inner_join
d. cross_product
page-pf6
To use the template function copy, the program must include the statement ____.
a. #include <standard>
b. #include <math>
c. #include <operators>
d. #include <algorithm>
The typedef ____ iterator is a read-only iterator.
a. size_type
b. reverse_iterator
c. value_type
d. const_reference
page-pf7
The general syntax to declare a pointer variable is ____.
a. dataType &identifier;
b. *dataType identifier;
c. &dataType identifier;
d. dataType *identifier;
The statement ____ declares intList to be a vector and the component type to be int.
a. vector<int> intList;
b. int.vector intList;
c. int.vector<int> intList;
d. vector.int intList<int>;
The function discardExp reads and writes the input data only until the input is '____'.
a. ;
b. *
c. +
page-pf8
d. =
Elements are added at one end of the queue, called the ____ or rear.
a. back
b. head
c. top
d. middle
In a doubly linked list, some of the operations require modification from how they were
implemented for a regular linked list, because of the ____ pointer(s) in each node.
a. binary
b. two
c. three
d. null
page-pf9
The symbol ""____"" means ""Cartesian product.""
a. *
b. x
c. +
d. %
When inserting into a B-tree, if the key is not in the tree, the search terminates at a
____.
a. leaf
b. root
c. node
d. branch
page-pfa
The destructor automatically executes when the class object goes out of ____.
a. scope
b. use
c. bounds
d. phase
Passing parameters to a function has an effect at ____ time.
a. compile
b. link
c. run
d. build
The algorithm ____ reverses the elements of a given range while copying into a
destination range.
a. copy_reverse
b. inverse_copy
page-pfb
c. copy
d. reverse_copy
In a heap, the ____ element of the list is always the first element of the list.
a. smallest
b. largest
c. most important
d. least important
The item insertion, deletion, and lookup operations require that the binary tree be ____.
a. duplicated
b. traversed
c. inverted
d. converted
page-pfc
When a dynamic variable is no longer needed, it can be ____.
a. recycled
b. reassigned
c. reconstructed
d. destroyed
In ____ notation, the operator is written between the operands.
a. infix
b. postfix
c. prefix
d. nofix
page-pfd
A convenient and fast way to implement an associative container data structure is to use
a ____.
a. linked list
b. binary search tree
c. priority queue
d. hash table
A function that calls itself is called a(n) ____.
a. recursive function
b. iterative function
c. base function
d. successive function
The name of a constructor is the same as the name of the ____.
a. class
b. main function
page-pfe
c. helper function
d. friend function
Elements in an associative container are automatically sorted according to some
ordering criteria.
In the function ____, the growth rate is quadrupled when the problem size is doubled.
a. g(n)=1
b. g(n)=nlog2n
c. g(n)=n2
d. g(n)=2n
page-pff
The stack is empty if stackTop is ____.
a. 0
b. NULL
c. 1
d. MAX
The statement ____ advances cntItr so that it points to the next element in the container.
a. ++cntItr;
b. cntItr++;
c. *cntItr;
d. cntItr*;
In recursion, the execution in the previous call begins from the point immediately
following the recursive call.
page-pf10
The base case starts the recursion in a recursive function.
The topological sort algorithm can be implemented either using the depth first traversal
or the breadth first traversal.
A sequential search assumes that the data is in a particular order.
page-pf11
When overloading an operator, the meaning of how an operator works with built-in
types remains the same.
It is good programming practice to develop separate code for each type of list we need.
The length of a list is the number of elements in the list.
In a selection sort, we find the largest item in the list first.
page-pf12
Item insertion and deletion in a linked list requires significant data movement.
The labeling of the vertices of a graph depends on a specific application.
Because a queue is an important data structure, the Standard Template Library (STL)
provides a class to implement queues in a program.
A derived class cannot directly access public members of a base class.
page-pf13
The call to the recursive function contains a statement that causes the same function to
execute again before completing the current call.
An array is a random access data structure; a stack is not.
Elements in an associative container are not sorted automatically.
page-pf14
The limiting condition for a list might be the number of elements in the list.
The operator new has two forms: one to allocate a single variable, and another to
allocate an array of variables.
In the analysis of an algorithm, the key comparisons refer to comparing the key of the
search item with the position of an item in the list.
The two most common graph traversal algorithms are the depth first traversal and
height first traversal.

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.