Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.
Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.
Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.
Write down what you hear. Use numbers, not letters. Don't forget the currency sign if needed.
Supongamos el siguiente código, donde v es un vector<int> que representa la lista [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
auto it = v.begin() + 3;v.insert(it + 2, 33);
¿Qué lista representa v tras ejecutar este código?
Supongamos una lista v = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] implementada mediante un vector<int>. Ahora ejecutamos lo siguiente:
auto it1 = v.begin();
auto it2 = it1 + 2;
auto it3 = it1 + 3;
auto it4 = it1 + 4;
auto it5 = v.end();
v.erase(v.begin() + 3);
Suponiendo que el array no se redimensiona durante la operación. ¿Qué iteradores se invalidan tras la operación de borrado?
El siguiente programa realiza un recorrido de un vector<int>, imprimiendo sus elementos desde el final hasta el principio.
auto it = v.end();
while (it != v.begin()) {
cout << *it << " ";
it--;
}
¿Es correcto?
El siguiente programa realiza un recorrido de un vector<int>, imprimiendo sus elementos desde el final hasta el principio.
auto it = v.end();
while (it != v.begin()) {
it--;
cout << *it << " ";
}
¿Es correcto?
Supongamos que v es un vector<int> de tamaño par. ¿Qué hace el siguiente programa?
auto it = v.begin();
int half_size = v.size() / 2;
for (int i = 0; i < half_size; i++) {
*(it + half_size) = *it;
++it;
}
Financial literacy is an individual journey.