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

Data Structures – Sorting Exam Questions And Answers

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

DATA STRUCTURES – SORTING EXAM QUESTIONS AND ANSWERS

Vista previa del contenido

DATA STRUCTURES – SORTING
EXAM QUESTIONS AND ANSWERS



Internal and external sorting - Correct Answers -What are the two types of sorting?

the number of comparisons of keys AND the number of times entries must be moved
inside a list - Correct Answers -What are the two major factors used to evaluate the
performance of a sorting algorithm?

internal sorting - Correct Answers -records to be sorted are kept in RAM

external sorting - Correct Answers -records are kept in external files on disks, tapes, or
other secondary storage devices

The performance of a sorting algorithm is closely related to the ... - Correct Answers -
underlying data structure of a list (algorithm should be aware of the implementation of
the list - preferable to implement the sorting algorithm as a method of the list class
[sortable list]}

when the list is already in sorted order (only n - 1 comparison of keys) - Correct
Answers -The best case for contiguous insertion sort occurs...

when the list is in reverse order - Correct Answers -The worst case for contiguous
insertion sort occurs...

Selection sort is more suitable for long contiguous list than insertion sort - Correct
Answers -In what situation may you select selection sort over insertion sort?

It is easy to implement. - Correct Answers -What is the advantage of bubble sort?

numbers that are multiples of each other - Correct Answers -When Shell sort is used,
what types of increments should you avoid?
quicksort - Correct Answers -best: O(n lg n)
avg: O(n lg n)
worst: O(n^2)
idea: partition the list using some chosen key called the pivot (those less than pivot in
one sublist, those greater in another); sort separately and merge at the end

radix sort - Correct Answers -best: O(nk)

Información del documento

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