• ¿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 1 fuera de 3 páginas
Examen

Data Structures Stack Exam With Correct Answers

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

DATA STRUCTURES STACK EXAM WITH CORRECT ANSWERS

Vista previa del contenido

DATA STRUCTURES STACK EXAM
WITH CORRECT ANSWERS



T/F In the Java API class java.util.Stack<E> implements a stack; there is no Stack
interface - Correct Answers -True

T/F an array can be used for storage of a stack instead of using a Java ArrayList class -
Correct Answers -True

T/F the statement Stack<String> myStack = new Stack<String>(); defines a stack that
holds String objects - Correct Answers -True

T/F there is only one stack interface in Java - Correct Answers -False

A(n) _ is a data structure in which objects are inserted into and removed from the same
end - Correct Answers -Stack

A(n) _ is a string that reads the same in either direction: left to right or right to left -
Correct Answers -Palindrome

In terms of efficiency all stack operations using an array structure are - Correct Answers
-O(1)

The value of the following postfix expression is 12+4*3+ - Correct Answers -15

Rewrite the following statement as an infix expression 56* 10- - Correct Answers -5*6-
10

A(n) _ is a data structure with the property that only the top element is accessible -
Correct Answers –Stack
Consider the implementation of the stack using an array. What goes wrong if we try to
store the top of the stack at location [0] and the bottom of the stack at the last used
position if the array - Correct Answers -Both push and pop would require linear time

In the linked list implementation of the stack class where does the push method place
the new entry on the linked list - Correct Answers -At the head

In the array version of the stack class, which operations require linear time for their
worst case (is empty, peek, pop) - Correct Answers -None

Información del documento

Subido en
28 de julio de 2025
Número de páginas
3
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.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.
millyphilip
3.7
(562)
Vendido
3013
Seguidores
1964
Artículos
47749
Última venta
19 horas 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