Wednesday, October 4, 9:30-10:45am, PM 110
Test 1 will cover all material from the beginning of the semester through container adapters. This material includes everything discussed in lectures and covered in assignments. You should know concepts (e.g. what an iterator is, how Big-O notation works) as well as syntax. You may be asked to write, analyze, and/or debug code.
;
var output= {1.2, 3.4, 5.6};
vector v for (int i = 0; i < v.length; i++) {
.append(i ** 2);
output}
// existing vector v with n elements
for(int i = 0; i < v.size(); i++) {
for (int j = 0; j < v.size(); j++) {
.insert(v.begin(), v[i] * v[j]);
v}
}
random_shuffle
algorithm takes two
random access iterators as arguments, which of the sequenetial
containers can be shuffled using that algorithm?<EXPRESSION>
below) that uses find_if
to
compare all elements from a vector v
to find the first
value greater than threshold
// existing vector<int> v
int threshold;
>> threshold;
cin auto it find_if(v.begin(), v.end(), <EXPRESSION>);
auto
keyword? When is it
used?