Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

Data Structures & Algorithms Mid Term Exam Questions with Answers

Puntuación
-
Vendido
-
Páginas
4
Grado
A+
Subido en
12-04-2025
Escrito en
2024/2025

Data Structures & Algorithms Mid Term Exam Questions with Answers Array - Correct Answers: a fixed length collection that holds elements of similar types Array access elements by _______ - Correct Answers: index Array elements are stored ________ in memory - Correct Answers: sequentially Elements are ________ at the left-most empty index - Correct Answers: inserted Locating values in an unordered array requires a ___________________. - Correct Answers: sequential search Deleting unordered arrays 1. ______, 2. _____, 3. ________ - Correct Answers: search, remove, shift Ordered Arrays - Correct Answers: same structure as unordered, but elements are sorted in natural order Unordered array search - Correct Answers: search sequentially left to right Linear search - Correct Answers: accessing elements by index Ordered array search - Correct Answers: linear search, binary search Binary search - Correct Answers: split into halves, decide whether target is higher or lower, repeat cutting Binary vs Linear - Correct Answers: Binary more efficient depending on array size Big O Notation - Correct Answers: shorthand for an algorithm's complexity, or how it responds to changes to the size of its inputs Big O Linear - Correct Answers: O(n) Big O Binary - Correct Answers: O(log(n)) Bubble sort - Correct Answers: beginning at left, compares to object to the right, swap if left is greater than right, repeat. start again at value lower than first value Bubble sort peformance - Correct Answers: O(N^2) aka slow Selection sort - Correct Answers: start at left, find lowest value, move it to position 0, repeat process after moving one to the right Selection sort performance - Correct Answers: = bubble, but less N Insertion sort performance - Correct Answers: fastest & most complex Insertion Sort - Correct Answers: Select left-most unsorted, temp remove, start at i-1 moving left, compare removed to next element, if smaller, shift item in array right once. repeat until smaller element encountered, or position 0 reached. removed element is then inserted Invariants - Correct Answers: Conditions that remain unchanged as an algorithm proceeds Abstract data structure - Correct Answers: Ex: stacks & queues Concrete data structure - Correct Answers: Arrays (due to specific implementation) Stacks - Correct Answers: collection of elements that only allows access to the last element added Queues - Correct Answers: a sequential collection of items with first in first out retrieval Circular Queue - Correct Answers: same as queues, but wraps around Deque - Correct Answers: elements may be added and removed from either end Priority Queues - Correct Answers: abstract type similar to queue, but elements are assigned a priority How does a linked list work? - Correct Answers: An item that has a reference to the next link Linked list components - Correct Answers: insertFirst, deleteFirst, displayLink Double-ended lists - Correct Answers: same as linked list, but has both first and last fields Linked List Performance - Correct Answers: insertion/deleting @ beginning: O(1). Search, delete, insert, next to specific item: O(N) Doubly linked list - Correct Answers: Links have references to previous and next links Data type - Correct Answers: Referred to primitive types, now you can create your own data types (classes) Abstraction - Correct Answers: considered apart from detailed specification or implementation ADT Lists/Linear List - Correct Answers: group of items arranged in a linear order Sorted List - Correct Answers: Items arranged in sorted order by key value Solving a recursive problem - Correct Answers: Use the solution of the same problem with progressively simpler values Divide and conquer algorithm - Correct Answers: Two sorted arrays, merge into final array (mergesort) Mergesort Efficiency - Correct Answers: n = 8 .File class - Correct Answers: abstract representation of a file or folder Scanner class - Correct Answers: used in reading a file Constructing a file object - Correct Answers: File myFile = new File(""); Text format - Correct Answers: human readable data representation as a sequence of characters Binary Format - Correct Answers: machine-readable data representation as a sequence of bytes

Mostrar más Leer menos
Institución
Data Structures And Algorithm Analysis In C+
Grado
Data Structures and Algorithm Analysis in C+

Vista previa del contenido

Data Structures & Algorithms
Mid Term Exam Questions with
Answers
Array - Correct Answers: a fixed length collection that holds elements of similar types



Array access elements by _______ - Correct Answers: index



Array elements are stored ________ in memory - Correct Answers: sequentially



Elements are ________ at the left-most empty index - Correct Answers: inserted



Locating values in an unordered array requires a ___________________. - Correct Answers: sequential
search



Deleting unordered arrays 1. ______, 2. _____, 3. ________ - Correct Answers: search, remove, shift



Ordered Arrays - Correct Answers: same structure as unordered, but elements are sorted in natural
order



Unordered array search - Correct Answers: search sequentially left to right



Linear search - Correct Answers: accessing elements by index



Ordered array search - Correct Answers: linear search, binary search



Binary search - Correct Answers: split into halves, decide whether target is higher or lower, repeat
cutting

Escuela, estudio y materia

Institución
Data Structures and Algorithm Analysis in C+
Grado
Data Structures and Algorithm Analysis in C+

Información del documento

Subido en
12 de abril de 2025
Número de páginas
4
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.09
Accede al documento completo:

¿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

Conoce al vendedor
Seller avatar
SAVEMYEXAMS

Documento también disponible en un lote

Conoce al vendedor

Seller avatar
SAVEMYEXAMS stuvia
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2
Miembro desde
1 año
Número de seguidores
2
Documentos
1594
Última venta
10 meses hace
SAVEMYEXAMS

Assignments, Case Studies, Research, Essay writing service, Questions and Answers, Discussions etc. for students who want to see results twice as fast. I have done papers of various topics and complexities. I am punctual and always submit work on-deadline. I write engaging and informative content on all subjects. Send me your research papers, case studies, psychology papers, etc, and I’ll do them to the best of my abilities. Writing is my passion when it comes to academic work. I’ve got a good sense of structure and enjoy finding interesting ways to deliver information in any given paper. I love impressing clients with my work, and I am very punctual about deadlines. Send me your assignment and I’ll take it to the next level. I strive for my content to be of the highest quality. Your wishes come first— send me your requirements and I’ll make a piece of work with fresh ideas, consistent structure, and following the academic formatting rules. For every student you refer to me with an order that is completed and paid transparently, I will do one assignment for you, free of charge!!!!!!!!!!!!

Lee mas Leer menos
0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

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