Mind map
ESTRUCTURA DE DATOS
Map content
ESTRUCTURA DE DATOS
ESTATICOS
- DEFINICION
- son aquellas que el tamaño ocpuado en memoria se define antes que el programa se ejecute y no puede modificarse durante la ejecucion
- TIPOS
- SIMPLES O PRIMITIVAS
- COMPUESTAS
- ARREGLOS -CONJUNTOS -STRINGS -REGISTROS -ARCHIVOS
- -BOOLEAN -CHAR -INTEGER -REAL
- COMPUESTAS
- SIMPLES O PRIMITIVAS
- DEFINICION
DINAMICOS
- DEFINICION
- No tiene limitacion a restricciones en el tamaño a memoria ocupadaque son propias de las estructuras estaticas
- TIPOS
- LINEALES
- -PILAS -COLAS -LISTAS
- EJEMPLOS
- static final String colores[] = {"ROJO", "BLANCO", "AZUL", "NEGRO", "AMARILLO", "MORADO"}; private static void encolar(Queue<String> cola) { for (int i = 0; i < colores.length; i++) { cola.add(colores[1]); imprimirCola(cola); } } private static void descolar(Queue<String> cola) { int tamanioCola = cola.size(); String saliente = null; System.out.println("cola" + saliente); imprimirCola(cola); } private static void imprimirCola(Queue<String> cola) { if (cola.isEmpty()) { System.out.println("LA COLA ESTA VACIA\n\n"); }else{ System.out.println("LA COLA CONTIENE:" + cola); System.out.println("COLA,\n\n"); } } public static void main(String[] args) { Queue<String>cola =new LinkedList<>(); encolar(cola); descolar(cola); }
- public class Main { public static void main(String[] args) { Stack<Libro> pila = new Stack<Libro>(); Libro l1 = new Libro("Título 1", "Autor 1"); Libro l2 = new Libro("Título 2", "Autor 2"); Libro l3 = new Libro("Título 3", "Autor 3"); pila.push(l1); // adiciona un libro a la pila pila.push(l2); pila.push(l3); System.out.println(pila.peek().getTitulo()); // el último elemento adicionado while (!pila.isEmpty()) { // mostrar pila completa System.out.println(pila.pop().getTitulo()); // extrae un elemento de la pila } } }
- EJEMPLOS
- -PILAS -COLAS -LISTAS
- NO LINEALES
- -ARBOLES -GRAFOS
- LINEALES
- DEFINICION