Ver Mensaje Individual
  #4  
Antiguo 11-06-2019
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
Código:
P: PILA
MENORES, MAYORES: PILA
UMBRAL: SORTABLE

WHILE P NOT EMPTY
	X = P.POP
	IF X < UMBRAL THEN
		MENORES.PUSH(X)
	ELSE
		MAYORES.PUSH(X)
END WHILE


// Saludos
Responder Con Cita