• ¿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
Resumen

Summary Data Structures and Algorithms: Complexity, Trees, Hashing and Graphs

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

Three pages of data structures and algorithms notes organised around the operations exam questions actually ask you to cost. Section 1 covers asymptotic notation, amortised analysis and what big O hides, with the standard sorting results and their justifications. Section 2 covers arrays, linked lists, stacks, queues and deques as trade-offs in operation mix. Section 3 covers tree traversals, binary search trees, AVL and red-black balancing, and heaps including build-heap in O(n). Section 4 covers hashing (collisions, load factor, resizing) and graphs (representations, BFS, DFS, Dijkstra, Bellman-Ford, topological order). A six-by-five table gives the cost of each operation across the main structures, which is the comparison most papers ask for. Includes four practice questions with marking checkpoints, an eight-term glossary, and a 40-minute revision plan. 3 pages, A4, PDF, print-ready.

Vista previa del contenido

Data Structures and Algorithms: Complexity, Trees,
Hashing and Graphs
Operation costs, invariants and worked traces for a first course in algorithms
Computer Science | Undergraduate (Level 5) | December 2026


WHAT IS INSIDE

1. Measuring cost: asymptotics and what they hide
2. Linear structures: arrays, lists, stacks and queues
3. Trees: traversal, search trees and heaps
4. Hashing and graphs
Exam question patterns
Glossary of exam-ready definitions

1. Measuring cost: asymptotics and what they hide
Big O describes an upper bound on growth, Omega a lower bound and Theta a tight bound. The
standard orderings - O(1), O(log n), O(n), O(n log n), O(n squared), O(2 to the n) - are the vocabulary
the exam expects, and each must be attached to a specific operation rather than to a data structure as a
whole: a hash table gives O(1) average lookup and O(n) worst case, and saying only 'O(1)' is
incomplete.
Asymptotics hide constants, memory layout and cache behaviour, which is why an array can beat a
linked list in practice even where the asymptotic costs are equal. Amortised analysis is a separate idea:
appending to a dynamic array is O(1) amortised although individual appends can be O(n), and
doubling capacity is what produces that result. Recurrence relations for divide-and-conquer algorithms
are solved by the master theorem, and the standard results - merge sort and heap sort at O(n log n),
quicksort at O(n log n) average and O(n squared) worst - should be known with their justification.
• Space complexity - count auxiliary space, not the input; in-place algorithms are O(1) auxiliary.
• Stability - a stable sort preserves the relative order of equal keys; merge sort is stable, heap sort and
quicksort are not.
• Comparison lower bound - comparison sorts cannot beat Omega(n log n), which is why counting
and radix sort trade space for time.
• Adversarial inputs - a hash table degenerates to O(n) if every key collides, which is why randomised
hashing exists.

2. Linear structures: arrays, lists, stacks and queues
An array gives O(1) random access and O(n) insertion or deletion in the middle, because elements after
the position must shift. A linked list reverses that trade: O(1) insertion at a known node, but O(n)
search and poor locality. Doubly linked lists add O(1) deletion given a node, at the cost of an extra
pointer per element; circular lists remove the need to test for the end.
A stack is last-in-first-out and underpins function calls, expression evaluation and depth-first search; a
queue is first-in-first-out and underpins breadth-first search and scheduling. A deque supports both
ends in O(1), and a priority queue - implemented as a binary heap - supports insert and extract-min in
O(log n). Choosing between them is a question about which operations are frequent, so state the


Data Structures and Algorithms: Complexity, Trees, Hashing a Page 1 of 3

Información del documento

Estudio
Desconocido
Subido en
1 de diciembre de 2026
Número de páginas
3
Escrito en
2026/2027
Tipo
Resumen
$7.98

¿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

Vendido
0
Seguidores
0
Artículos
225
Última venta
-



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