En Java podemos encontrar variadas formas de crear Colas en pocas lineas de código, un ejemplo es una de sus Interfaces que tiene como nombre “Queue”.
A queue (also called a row) is a data structure, characterized by being a sequence of elements in which the push insert operation is performed by one end and the pop extraction operation by the other. It is also called the FIFO structure (from First In First Out), because the first element to enter will also be the first to leave.
Para Insertar:
– add().
– offer().
– offer().
Para Extraer:
– remove().
– poll().
– remove().
– poll().
Para Consultar el Frente:
– element().
– peek().
– peek().
Well in conclusions we have that the queues are data structures that work in the following way:
the first thing to enter is the first thing to come out like a bank row or a ball gun, the first ball to enter will be the first one to come out and obviously the last one to enter will be the last one to come out.
A continuación dos links de dos vídeos con una clara explicación de la implementacion de colas en java.
Autores:
Samuel Gomez jaimes.
Diego Armando Aguirre Garcia
Marco Antonio Martinez Diaz
Aaron Ruiz Hernández
Israel Arzate Álvarez
José Ibarra Benito
Luis Alejandro Damián Alvarado
Aaron Ruiz Hernández
Israel Arzate Álvarez
José Ibarra Benito
Luis Alejandro Damián Alvarado
Fuentes:
https://es.wikipedia.orgmichelletorres.mx
Colas.pdf
No hay comentarios:
Publicar un comentario