Update your browser or use a newer device. We no longer support this version, so parts of Varsity Tutors may not work.
Dismiss
C Plus Plus Quiz
10 questions · no time limit
0:00
Finish quiz
ALGORITHMS AND COMPLEXITY
Question 1
of 10
Flag for review
No time limit
Current
Answered
Flagged
Not seen
PASSAGE
Consider the range
std::vector<int> v{2, 4, 8, 10, 6, 12};
and the call
std::binary_search(v.begin(), v.end(), 6)
.
Which statement best describes this call?
A
Its ordering requirement is violated, so its result cannot be relied upon.
B
It is guaranteed to return
false
because
6
6
6
follows
10
10
10
.
C
It is guaranteed to return
true
because
6
6
6
is present.
D
Its ordering requirement is met because the endpoints are ascending.
YOUR PROGRESS
10
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
1
2
3
4
5
6
7
8
9
10
KEYBOARD
Pick an answer
A
B
C
D
Next question
↵
→
Previous
←
Flag for review
F