.
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());
Amortized O(1)
O(n)
Amortized O(n)
O(1)
S --> ------------ ... RAD RADG RAD RA R RB RBX
S --> ------------ ... RAD RADG RADGB RADGBX
None of the other choices
S --> ------------ ... RADFGB RADFGBX
S --> ------------ ... C CD CDX
fsu::Vector widgetVector;
WidgetVector widgetVector (15,ZED);
Fsu::Vector widgetVector (15,ZED);
Fsu::Vector(15,ZED) widgetVector;
None of the other choices
1
2
3
4
5
D
F
H
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;
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
A
B
C
D
E
F
G
H
I
J
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 */ }
O(log n)
Θ(log n)
O(n)
Θ(n)
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());
O(1)
Amortized O(1)
O(n)
Amortized O(n)
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
PushBack(t)
PushFront(t)
Insert(i,t)
[n] (bracket operator)
SetSize(n)
Front()
Back()
Begin()
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
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;
O(1)
Amortized O(1)
O(n)
Amortized O(n)
Θ(log n)
O(log n)
O(n)
Θ(n)
7
8
9
10
K
Q
W
Y
1
2
3
4
5
D
F
H
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
7
8
9
10
K
Q
W
Y
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
None of the other choices
P1 == p1
P1 == p2
P1 == p3
P1 == p4
A B C D E
A B D C E
D B E C A
D B A C E
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
PushFront(t)
PushBack(t)
PopFront()
PopBack()
None of the other choices
All of the above
None of the above
A B C D E
A B D C E
D B E C A
D B A C E
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
15 30 25 95 80 50
50 25 80 15 30 95
50 25 15 30 80 95
15 25 30 50 80 95
Theta(N)
Theta(H)
Theta(log N)
Theta(log H)
A B C D E
A B D C E
D B E C A
D B A C E
O(1)
Amortized O(1)
O(n)
Amortized O(n)
Includes(tval)
Remove(iter)
Insert(iter,tval)
Insert(tval)
Remove(tval)
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.