COP 59241

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

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
The statement ____ declares list to be an array of five integers.
a. int [5] list;
b. int list[5];
c. int list[];
d. int list[]={0,1,2,3,4,5};
The balance factor of x, written bf(x), is defined by ____.
a. bf(x)= xl " x1
b. bf(x)= x1 " xh
c. bf(x)= xh " x1
d. bf(x)= l(xh) " l(x1)
The ____ can be used to determine whether two stacks are identical.
a. rational operator
b. logical operator
page-pf2
c. relational operator
d. arithmetic operator
A circuit in a graph that includes all the edges of the graph is called a(n) ____.
a. Euler circuit
b. Newton circuit
c. Einstein circuit
d. Prim circuit
A node in the binary tree is called a ____ if it has no left and right children.
a. leaf
b. root
c. node
d. branch
page-pf3
The____ for array-based lists is of order O(n log2n) even in the worst case, therefore
overcoming the worst case of the quicksort.
a. mergesort
b. ShellSort
c. holdsort
d. heapsort
The statement ____ stores the address of x in p.
a. p = &x;
b. p = &x
c. x = &p;
d. x = &p
page-pf4
In ____, one or more members of a class are objects of another class type.
a. inheritance
b. redefinition
c. composition
d. encapsulation
A technique in which one system models the behavior of another system is called ____.
a. referencing
b. bench testing
c. simulation
d. reproduction
We need ____ pointers to build a linked list.
a. two
b. three
c. four
page-pf5
d. five
____ serves to hide the details of the operations on the data.
a. Inheritance
b. Information hiding
c. A destructor
d. A constructor
The data type of each ____ depends on the specific application.
a. pointer
b. node
c. address
d. link
page-pf6
We call the remainder of x after division by 2 the ____ bit of x.
a. rightmost
b. leftmost
c. middlemost
d. innermost
A ____ in G is a simple path in which the first and last vertices are the same.
a. circle
b. loop
c. cycle
d. recursion
page-pf7
The algorithms accumulate, adjacent_difference, inner_product, and partial_sum are
numerical functions and manipulate numeric data.
The general syntax to declare an object of type pair is ____.
a. pair<Type1, Type2> pElement;
b. pair pElement<Type1, Type2>;
c. pair.{Type1, Type2} pElement;
d. pair{Type1, Type2} pElement;
The most important operation performed on a list is the ____.
a. search algorithm
b. insert algorithm
c. deletion algorithm
d. allocation or initialization algorithm
page-pf8
____ sort sorts the list by moving each element to its proper place.
a. Quick
b. Bubble
c. Selection
d. Insertion
An ____ is an object that produces each element of a container, such as a linked list,
one element at a time.
a. initiator
b. iterator
c. interpreter
d. accessor
page-pf9
If the search item is the last element in the list, the algorithm makes ____
comparison(s).
a. one
b. two
c. three
d. n
Modifying algorithms that change the order of the elements, not their values, are also
called ____.
a. polymorphic algorithms
b. associative algorithms
c. compensating algorithms
d. mutating algorithms
The structured design approach is also known as ____.
a. top-down design
b. bottom-up design
page-pfa
c. object design
d. stepwise updating
A data structure in which the elements are added and removed from one end only is
known as a ____.
a. queue
b. deque
c. hash table
d. stack
If a class has member variables that are pointers, you must ensure that you implement
____.
a. garbage collection
b. base constructors
c. friend functions
d. a destructor
page-pfb
Composition is a(n) "____" relationship.
a. is a
b. has a
c. was a
d. had a
An array created during the execution of a program is called a ____ array.
a. static
b. final
c. just in time
d. dynamic
page-pfc
In ____, the data is stored within the hash table.
a. closed addressing
b. open addressing
c. inverted addressing
d. converted addressing
In a ____ the root has at least 2 children if it is not a leaf, and at most m children.
a. B-tree of height m
b. B-tree of level m
c. B-tree of size m
d. B-tree of order m
We can perform the operation ____ to retrieve the top element of the stack.
a. head
b. first
page-pfd
c. top
d. peek
____ is the ability to create new data types from existing data types.
a. Encapsulation
b. Information hiding
c. Inheritance
d. Polymorphism
To redefine a public member function of a base class in the derived class, the
corresponding function in the derived class must have ____.
a. the same name, number, and types of parameters
b. only the same name and types of parameters
c. only the same name and number
d. only the same number and types of parameters
page-pfe
A graph is empty if the number of vertices is 1.
The front of the queue is accessed whenever an element is deleted from the queue.
Every container contains the typedef reverse_iterator.
page-pff
In single inheritance, the derived class is derived from a single base class.
Sorted sublists are merged into a sorted list by comparing the elements of the sublists,
and then adjusting the references of the nodes with the smaller info.
Every call to a recursive function requires the system to allocate memory for the local
variables and formal parameters.
Header files of new classes contain commands that tell the computer where to look for
definitions of the base class.
page-pf10
A binary tree is a dynamic data structure.
The equivalent postfix expression for the infix expression a + b is + a b.
Mergesort and quicksort are similar in how they partition the list.
When inserting an element in the priority queue, restoring the heap might result in
page-pf11
moving the new entry to the root node.
By using templates, you can write a single code segment for a set of related functions.
Computer simulations are particularly useful for simple systems where it is easy to
construct a mathematical model.
A class and its members can be described graphically using a notation known as
Unified Modeling Language (UML) notation.
page-pf12
The breadth first traversal traverses the graph from each vertex that is not visited.
Associated with each item in a data set is a special member that uniquely identifies the
item in the data set.
Because the size of the array to store queue elements is fixed, only a finite number of
queue elements can be stored in the array.

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.