Quizzes
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Create a Quiz
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Search
Create A Quiz
Take Quizzes
Animal
Nutrition
Love
Relationship
Computer
Sports
Society
Business
Geography
Language
Personality
Harry Potter
Movie
Television
Music
Online Exam
Health
Country
Art
Entertainment
Celebrity
Math
Game
Book
Fun
Science
Food
History
Education
All Topics
Products
Quiz Maker
Training Maker
Survey Maker
Flashcards
Brain Games
See All
ProProfs.com
Quizzes
Quizzes
›
Science
›
Chemistry
Cop4530 Comprehensive
37 Questions
|
By Victorfolz | Updated: Aug 3, 2016
| Attempts: 191
Share
Start
Share on Facebook
Share on Twitter
Share on Whatsapp
Share on Pinterest
Share on Email
Copy to Clipboard
Embed on your website
Question
1
/ 38
🏆
Rank #--
▾
0 %
0/100
Score
0/100
1.
To find a pointer
max
to the largest element in the array a we can use the following genericalgorithm call (there are
size
elements in
a
)
Max = fsu::g_max_element (a);
Max = fsu::g_max_element (a, a + size);
Max = fsu::g_max_element (a.Begin());
Max = fsu::g_max_element (a.Begin(), a.End());
Submit
Start Quiz
About This Quiz
.
2.
What first name or nickname would you like us to use?
You may optionally provide this to label your report, leaderboard, or certificate.
2.
The following illustrates the contents of the control stack S during a depth-first search of a tree [tree3],beginning at vertex R = root and searching for the vertex X = goal. (Search left before right, beginning at the root.) The search process is started but not complete.
S -->------------...RADRADGRADRARRBRBX
S -->------------...RADRADGRADGBRADGBX
None of the other choices
S -->------------...RADFGBRADFGBX
S -->------------...CCDCDX
Submit
3.
Declare an fsu::Stack object S with elements of type fsu::String and underlyingcontainer fsu::Vector.
Fsu::Stack < fsu::String , fsu::Vector < fsu::String > > S;
Fsu::Vector < fsu::String , Stack < fsu::String > > S;
None of the other choices
Fsu::Stack < fsu::String > S;
Fsu::Deque < fsu::String , fsu::Vector < fsu::String > > S;
Submit
4.
Declare an fsu::List object L with elements of type fsu::String.
None of the other choices
Submit
5.
This is an illustration of a vector of characters to be used in answering the question:element: B D F F F H K Q W Yindex: 0 1 2 3 4 5 6 7 8 9What is the return value of the call lower_bound('F') ?
1
2
3
4
5
D
F
H
Submit
6.
What is the result of a levelorder traversal of the following tree?
A B C D E
A B D C E
D B E C A
D B A C E
Submit
7.
What is the result of a postorder traversal of the following tree?
A B C D E
A B D C E
D B E C A
D B A C E
Submit
8.
The following represents output from the call d.Dump() from the fsu::Deque object d:
What is the result of the following output statement?std::cout << d;
G H I J A B C
G H I J A B
None of the other choices
C D E F
C D E F G
Submit
9.
Declare a Deque object d with elements of type String.
None of the other choices
D = new fsu::Deque < char >;
Fsu::Deque < char , fsu::List < char > > d;
D fsu::Deque < char >;
Fsu::Deque < char > d;
Submit
10.
This is an illustration of a vector of characters to be used in answering the question:element: B D F F F H K Q W Yindex: 0 1 2 3 4 5 6 7 8 9What is the return value of the call upper_bound('F') ?
1
2
3
4
5
D
F
H
Submit
11.
The following represents output from the call d.Dump() from the fsu::Deque<char> object d:
What is the result of the d.Dump() after the call d.PushFront('X') ?
None of the other choices
Submit
12.
The following represents output from the call d.Dump() from the fsu::Deque<char> object d:What is the result of the following output statement?std::cout << d[5];
A
B
C
D
E
F
G
H
I
J
Submit
13.
Suppose the fsu::Deque<> d has elements in sorted order and we wish to insert the element x in correct order in d. The following generic algorithm call returns an iterator to the first correct location to insert x:
I = fsu::g_upper_bound(d, x);
I = fsu::g_upper_bound(d.Begin(), d.End(), x);
I = fsu::g_lower_bound(d.Begin(), d.End(), x);
I = fsu::g_lower_bound(d, x);
None of the other choices
Submit
14.
Declare a vector object widgetVector with elements of type Widget, size 15, and initialelement values equal to ZED.
Fsu::Vector widgetVector;
WidgetVector widgetVector (15,ZED);
Fsu::Vector widgetVector (15,ZED);
Fsu::Vector(15,ZED) widgetVector;
None of the other choices
Submit
15.
Select the answer that best describes the asymptotic runtime of the operation
fsu::List:: Destructor
Here
n
is the size of the list.
O(1)
Amortized O(1)
O(n)
Amortized O(n)
Submit
16.
What is the result of a pre-order traversal of the following tree?
15 30 25 95 80 50
50 25 80 15 30 95
50 25 15 30 80 95
15 25 30 50 80 95
Submit
17.
An abstract data type [ADT] consists of the following (select all that apply):
A set of operations on the data
Axioms, or rules, governing the way operations interact
A collection of data of some type T
An implementation in a modern programming language
Theorems, or provable behaviors derived from the axioms
Submit
18.
Given the type definitiontypedef fsu::Pair < String , int > PairType;and instances:
P1 == p1
P1 == p2
P1 == p3
P1 == p4
Submit
19.
Select a minimal set of operations that distinguish fsu::List from other fsu:: sequentialcontainers.
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
Submit
20.
What is the worstcase runtime for the Search algorithm in a AVL Binary Search Tree? (Select all that apply)
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
Submit
21.
Write a traversal loop for an fsu::Vector object v .
For (size_t i = 0; i
For (size_t i = 0; i
For (size_t i = 0; i < size; ++i) { /* whatever */ }
For (size_t i = 0; i < v.Size(); ++i) { /* whatever */ }
Submit
22.
What is the result of a pre-order traversal of the following tree?
A B C D E
A B D C E
D B E C A
D B A C E
Submit
23.
This is an illustration of a vector of characters to be used in answering the question:element: B D F F F H K Q W Yindex: 0 1 2 3 4 5 6 7 8 9What is the return value of the call lower_bound('Z') ?
7
8
9
10
K
Q
W
Y
Submit
24.
What is the worstcase runtime for the Search algorithm in a RedBlack LeftLeaningBinary Search Tree? (Select all that apply)
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
Submit
25.
Select a minimal set of operations that distinguish fsu::Vector from other fsu:: sequentialcontainers.(Here i is an iterator, t is a container element, and n is an integer.)
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
Submit
26.
To copy the elements from an fsu::Deque<> d to an fsu::Vector<> v we can use the following generic algorithm call:
Fsu::g_copy (d.Begin(), d.End(), v.Begin());
Fsu::g_copy (d.Begin(), d.End(), v);
None of the other choices
Fsu::g_copy (d.Begin(), d.End(), v, v + d.Size);
Fsu::g_copy (d.Begin(), d.End(), v.Begin(), v.End());
Submit
27.
What is the worst-case runtime for the Search algorithm in a Red-Black Binary Search Tree? (Select all that apply)
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
Submit
28.
Declare an ordered table object otable as an ordered set of pairs consisting of a key of typeKeyType and some data of type DataType. (Assume namespace fsu.)
All of the above
None of the above
Submit
29.
This is an illustration of a vector of characters to be used in answering the question:element: B D F F F H K Q W Yindex: 0 1 2 3 4 5 6 7 8 9What is the return value of the call upper_bound('X') ?
7
8
9
10
K
Q
W
Y
Submit
30.
Select the most appropriate statement of the asymptotic runtime for the sequential_searchalgorithm with input size n.
O(log n)
Θ(log n)
O(n)
Θ(n)
Submit
31.
Select the answer that best describes the asymptotic runtime of the operationfsu::Vector::PushBack(t)Here t is an item of type fsu::Vector::ValueType and n is the size of the vector.
O(1)
Amortized O(1)
O(n)
Amortized O(n)
Submit
32.
Select the answer that best describes the asymptotic runtime of the operation
fsu::Deque:: bracket operator [i]
Here i is an item of type size_t and n is the size of the deque.
Amortized O(1)
O(n)
Amortized O(n)
O(1)
Submit
33.
The adaptor template defining fsu::Stack < T , C > defines an implementation of ADT Stackby redefining the user interface of the container C. Which of the operations listed below must C possess for this adaptation to compile? (Check all that apply.)
PushFront(t)
PushBack(t)
PopFront()
PopBack()
Submit
34.
Select the answer that best describes the asymptotic runtime of the operation
fsu::List::PushBack(t)
Here
t
is an item of type
fsu::List::ValueType
and
n
is the size of the list.
O(1)
Amortized O(1)
O(n)
Amortized O(n)
Submit
35.
Select the most appropriate statement for the asymptotic runtime for the binary_searchalgorithm with input size n.
Θ(log n)
O(log n)
O(n)
Θ(n)
Submit
36.
Select the operations that define the associative container (Set) API. Here tval is a value anditer is an iterator.
Includes(tval)
Remove(iter)
Insert(iter,tval)
Insert(tval)
Remove(tval)
Submit
37.
Select a minimal set of operations that distinguish fsu::Deque from other fsu:: sequentialcontainers.
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
Submit
×
Thank you for your feedback!
View My Results
Related Quizzes
Grade 10 Chemistry Test: Assess Your Knowledge
Grade 10 Chemistry Test: Assess Your Knowledge
Chemistry Test: Questions & Answers For Every Level
Chemistry Test: Questions & Answers For Every Level
Grade 9 Chemistry Quiz: Test Your Chemistry Knowledge
Grade 9 Chemistry Quiz: Test Your Chemistry Knowledge
Test Your Knowledge On Elements!
Test Your Knowledge On Elements!
Lab Equipment Quiz Questions and Answers
Lab Equipment Quiz Questions and Answers
Elements Compounds and Mixtures Quiz For Grade 7th
Elements Compounds and Mixtures Quiz For Grade 7th
Thank you for your feedback!
Would you like to edit this question to improve it?
No thanks
Name:
Email:
Oops! Give us more information:
Incorrect Question
Incorrect Answer
Typos
I have a feedback
Submit
Please provide name and email to proceed.
Please provide correct email to proceed.
Please provide feedback.
Please select the option.
All (37)
Unanswered (
)
Answered (
)
To find a pointer max to the largest element in the array a we can use...
The following illustrates the contents of the control stack S during a...
Declare an fsu::Stack object S with elements of type fsu::String and...
Declare an fsu::List object L with elements of type fsu::String.
This is an illustration of a vector of characters to be used in...
What is the result of a levelorder traversal of the following...
What is the result of a postorder traversal of the following...
The following represents output from the call d.Dump() from the...
Declare a Deque object d with elements of type String.
This is an illustration of a vector of characters to be used in...
The following represents output from the call d.Dump() from the...
The following represents output from the call d.Dump() from the...
Suppose the fsu::Deque<> d has elements in sorted order and we...
Declare a vector object widgetVector with elements of type Widget,...
Select the answer that best describes the asymptotic runtime of...
What is the result of a pre-order traversal of the following tree?
An abstract data type [ADT] consists of the following (select all that...
Given the type definitiontypedef fsu::Pair < String , int >...
Select a minimal set of operations that distinguish fsu::List from...
What is the worstcase runtime for the Search algorithm in a AVL...
Write a traversal loop for an fsu::Vector object v .
What is the result of a pre-order traversal of the following...
This is an illustration of a vector of characters to be used in...
What is the worstcase runtime for the Search algorithm in a...
Select a minimal set of operations that distinguish fsu::Vector from...
To copy the elements from an fsu::Deque<> d to...
What is the worst-case runtime for the Search algorithm in a Red-Black...
Declare an ordered table object otable as an ordered set of pairs...
This is an illustration of a vector of characters to be used in...
Select the most appropriate statement of the asymptotic runtime for...
Select the answer that best describes the asymptotic runtime of the...
Select the answer that best describes the asymptotic runtime of the...
The adaptor template defining fsu::Stack < T , C > defines an...
Select the answer that best describes the asymptotic runtime of the...
Select the most appropriate statement for the asymptotic runtime for...
Select the operations that define the associative container (Set) API....
Select a minimal set of operations that distinguish fsu::Deque from...
X
OK
X
OK
Cancel
X
OK
Cancel
Your Rank: #-- / --
Leaderboard
✕