Please enable JavaScript.
Coggle requires JavaScript to display documents.
Tipos abstractos y estructuras datos - Coggle Diagram
Tipos abstractos y estructuras datos
Definiciones
Estructura datos
Agrupación distintos tipos datos.
Se realizan operaciones de acceso y modificación datos.
Tipo Abstracto Datos (TAD)
TAD = ED + Operaciones
Pilas y colas
Colas
FIFO
Operaciones
estaVacia
Añadir
Inicializar
Quitar
Pilas
LIFO
Operaciones
estaVacia
Añadir
Inicializar
Quitar
Árboles
O están vacías o se componen de nodo raíz y subárboles.
Grafos en el que no pueden existir ciclos entre los nodos, y solo 1 raíz.
Términos
Hijos nodo
Padre
Grado árbol - grado del nodo que tenga mayor grado
Hermanos
Nodo terminal - el que no tiene hijos
Camino
Grado nodo - nº subárboles
Nivel nodo - longitud desde raíz al nodo
Altura árbol - nivel del nodo con nivel máximo
Recorridos
En anchura (BFS) - VISITA TODOS NODOS A DETERMINADA DISTANCIA DEL NODO INCIAL ANTES DE PASAR A LOS + ALEJADOS. NIVEL POR NIVEL.
En árboles binarios
Inorden - PRIMERO IZQUIERDO, LUEGO RAÍZ Y LUEGO DERECHO
Postorden - IZQUIERDO, LUEGO DERECHO Y LUEGO RAÍZ
Preorden - PRIMERO RAÍZ, LUEGO HIJO IZQUIERDO Y POR ÚLTIMO DERECHO
En profundidad (DFS) - VISITAR TODOS NODOS EXPLORANDO RAMA LO + PROFUNDAMENTE POSIBLE HASTA LLEGAR A HOJA.
Inorden
Postorden
Preorden
Tipos
Balanceado - NODOS IZQUIERDA IGUAL A LOS DE LA DERECHA
De búsqueda - CUALQUIER NODO SUBARBOL IZQUIERDO VALORES MENORES QUE EN EL DERECHO. ELEMENTOS ORDENADOS
Perfecto - HOJAS A LA MISMA PROFUNDIDAD
Lleno - CADA NODO 0 O 2 HIJOS
2-3-4 - TIPO BALANCEADO, DONDE TODOS NODOS MISMA PROFUNDIDAD Y CADA NODO HASTA 3 CLAVES Y HASTA 4 HIJOS
Estructuras dinámicas y estáticas
Estáticas - S.O REALIZA RESERVA MEMORIA PARA VARIABLES. INT, CHAR, ETC O ARRAYS Y LISTAS.
Dinámicas - VARIABLES PUEDEN CRECER O DECRECER. NECESITAN PUNTEROS Y SON + COMPLEJOS.
Registros
Conjuntos datos vistos como entidad completa.