• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 27 páginas
Examen

Data Structure Exam 2 Solved Correctly To Score A+!!!!

Document preview thumbnail
Vista previa 3 fuera de 27 páginas

Data Structure Exam 2 Solved Correctly To Score A+!!!!

Vista previa del contenido

Data Structure Exam 2 Solved
Correctly To Score A+!!!!
1. How is the order of the entries of an ADT list determined?

a) by the list itself

b) by the client

c) by the operating system

d) the order doesn't matter CORRECT ANSWERS B.

2. Which element of the list does not have a unique predecessor?

a) the head of the list

b) the tail of the list

c) the middle element of the list

d) all have unique predecessors CORRECT ANSWERS A.

3. Changing the value of an entry at a given position on the list would probably be the
task of which of these

methods?

a) replace

b) get

c) push

d) insert CORRECT ANSWERS A.

# What type would the getLength method for a list return?

a) boolean

b) ItemType

c) integer

,d) void CORRECT ANSWERS C

4. Which of the following list methods would have only one parameter?

a) isEmpty

b) setEntry

c) insert

d) remove CORRECT ANSWERS D

5. Which of the following methods from list would have no parameters and void for the
return type?

a) setEntry

b) getEntry

c) insert

d) clear CORRECT ANSWERS D.

6. Given bList: snibble, nibble, tribble, wibble, quibble. The command

bList.insert(3, Bob) is executed. What is the appearance of the list?

a) snibble, nibble, tribble, Bob, wibble, quibble

b) snibble, nibble, Bob, tribble, wibble, quibble

c) snibble, nibble, tribble, wibble, quibble, Bob, Bob, Bob

d) Bob, Bob, Bob, snibble, nibble, tribble, wibble, quibble CORRECT ANSWERS B.

7. Given bList: bob, slob, snob, cob, hob, rob and the operation bList.remove(4) is

executed. What does the list become?

a) bob, slob, snob, hob, rob

b) bob, slob, snob, cob, rob

c) bob, slob

d) hob, rob CORRECT ANSWERS A.

, 8. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to

method cList.getEntry(3)?

a) bip

b) snip

c) pip

d) rip CORRECT ANSWERS C.

9. Given cList: bip, snip, pip, rip, dip, clip. What value would be returned by the call to

method cList.insert(9, sip)?

a) true

b) false

c) it throws an exception

d) sip CORRECT ANSWERS B.

10. What should be returned by the list operation (aList.insert(2,x)).getEntry(2) ?

a) false

b) 2

c) x

d) an exception is thrown CORRECT ANSWERS C.

11. What would be returned by the list operation (bList.insert(3,x)).remove(3)?

a) 2

b) x

c) false

d) bList CORRECT ANSWERS D.

Información del documento

Subido en
30 de julio de 2025
Número de páginas
27
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$18.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
ElevatedExcellence
3.8
(178)
Vendido
955
Seguidores
505
Artículos
18436
Última venta
5 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes