logo

Crowdly

Browser

Add to Chrome

ESTRUCTURAS DE DATOS Grupo C

Looking for ESTRUCTURAS DE DATOS Grupo C test answers and solutions? Browse our comprehensive collection of verified answers for ESTRUCTURAS DE DATOS Grupo C at cvex1.ucm.es.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

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?

0%
0%
View this question

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?

0%
0%
View this question

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;

}

0%
0%
0%
View this question

¿Cuántos nodos tiene, como mucho, un árbol binario de altura 5?

View this question

¿Cuántos nodos tiene, como mucho, un árbol binario de altura 10?

View this question

¿Cuántos nodos tiene, como mucho, un árbol binario de altura 3?

View this question

¿Cuántos nodos tiene, como mucho, un árbol binario de altura 4?

View this question

¿Cuántos nodos tiene, como mucho, un árbol binario de altura 2?

View this question

Partimos de la siguiente función

void mi_funcion(const BinTree &t) {

if (t.empty()) {

// No hacemos nada

} else {

mi_funcion(t.left());

g(t.left());

g(t.right());

}

}

Si suponemos que el árbol de entrada t está equilibrado y que tiene tamaño , y que la función g() tiene coste en tiempo lineal con respecto al tamaño del árbol que recibe como parámetro. ¿Cuál es el orden de complejidad de esta función?

0%
0%
0%
0%
View this question

Partimos de la siguiente función

void mi_funcion(const BinTree &t) {

if (t.empty()) {

// No hacemos nada

} else {

mi_funcion(t.left());

mi_funcion(t.right());

g(t.left());

g(t.right());

}

}

Si suponemos que el árbol de entrada t es un árbol degenerado y que tiene tamaño , y que la función g() tiene coste en tiempo lineal con respecto al tamaño del árbol que recibe como parámetro. ¿Cuál es el orden de complejidad de esta función?

0%
0%
0%
0%
View this question

Want instant access to all verified answers on cvex1.ucm.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome