Skip to content

Sort Data on a Stack, With a Limited Set of Instructions, Using the Lowest Possible Number of Actions

Notifications You must be signed in to change notification settings

andersonhsporto/ft-push-swap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft-push-swap

norminette

O objetivo deste projeto é ordenar números inteiros em uma stack utilizando um conjunto limitado de operações utilizando C.



Funções Permitidas

As funções permitidas no escopo deste projeto são:

• write
• read
• malloc
• free
• exit

Compile o programa utilizando make, o programa pode ser executado da seguinte forma:

./push_swap 9 8 7 6 5 4

 ARG=`ruby -e "puts (1..100).to_a.shuffle.join(' ')"`; ./push_swap $ARG

Visualização

Execução com 100 números aleatórios: *utilizando o visualizador em python push_swap_visualizer.

mandatory