• ¿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 18 páginas
Examen

Version 2 Data Structures And Algorithms I 2026 Test Paper Solved Questions And Solutions

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

VERSION 2 DATA STRUCTURES AND ALGORITHMS I 2026 TEST PAPER SOLVED QUESTIONS AND SOLUTIONS

Vista previa del contenido

VERSION 2 DATA STRUCTURES AND
ALGORITHMS I 2026 TEST PAPER SOLVED
QUESTIONS AND SOLUTIONS

◉ Max-heap remove. Answer: Always a removal of the root, and is
done by replacing the root with the last level's last node, and
swapping that node with its greatest child until no max-heap
property violation occurs.
Complexity O(logN)


◉ Percolating. Answer: The upward movement of a node in a max-
heap


◉ Min-Heap. Answer: Similar to a max-heap, but a node's key is less
than or equal to its children's keys.


◉ Linked list vs Array. Answer: If a program requires fast insertion
of new data, a linked list is a better choice than an array.


◉ Abstract Data Type (ADT). Answer: A data type described by
predefined user operations, such as "insert data at rear," without
indicating how each operation is implemented.

,◉ List. Answer: An ADT for holding ordered data.


Data Structure Types: Array, linked list


◉ Tuple. Answer: Array Type
An immutable(fixed) container with ordered elements.


◉ Stack. Answer: An ADT in which items are only inserted on or
removed from the top of a stack.
*Last-in First-Out


Underlying data structures: Linked list


Push(stack, x), pop(stack), peek(stack), IsEmpty(stack),
GetLength(stack)


*Pop & peek should not be used on a empty stack.


◉ Stack operations. Answer: Example starting with stack: 99, 77
(top is 99).


Push(stack, x)

, Inserts x on top of stack
Push(stack, 44). Stack: 44, 99, 77


Pop(stack)
Returns and removes item at top of stack
Pop(stack) returns: 99. Stack: 77


Peek(stack)
Returns but does not remove item at top of stack
Peek(stack) returns 99. Stack still: 99, 77


IsEmpty(stack)
Returns true if stack has no items
IsEmpty(stack) returns false.


GetLength(stack)
Returns the number of items in the stack
GetLength(stack) returns 2.


◉ Queue. Answer: An ADT in which items are inserted at the end of
the queue and removed from the front of the queue.

Información del documento

Subido en
13 de abril de 2026
Número de páginas
18
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿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.
Vendido
35
Seguidores
1
Artículos
22842
Última venta
2 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