Skip to content

Instantly share code, notes, and snippets.

@andresAlvarado
Last active April 3, 2017 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andresAlvarado/9705e96ae148f46bedccc58bf2d02f68 to your computer and use it in GitHub Desktop.
Save andresAlvarado/9705e96ae148f46bedccc58bf2d02f68 to your computer and use it in GitHub Desktop.
def encolar( self, dato ):
nuevoNodo = Nodo( dato )
if not self.cabeza:
nuevoNodo.asignarSig( None )
self.cabeza = nuevoNodo
else:
self.cola.asignarSig( nuevoNodo )
self.cola = nuevoNodo
self.tamanio += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment