How mo7ammadd/push_swap works
push_swap is a command-line stack-sorting project: it accepts numeric arguments and flags, validates them, builds stack A, and is intended to choose a sorting strategy that emits stack-operation commands. The sampled main currently stops after building and printing the stack; it does not call the strategy selector or executor. The algorithm and operation modules show the intended sorting behavior, but their integration is incomplete or inconsistent. Edges reflect only calls visible in excerpts; relationships among unsampled parsing modules are omitted.
Main entry points: main.c Program entry · ft_Execution.c Algorithm dispatcher · checkers.c Flag and number checks · medium.c Medium sort
Components 16
Input and validation
- Argument splitting
Validity/split_input.c - Word splitting
Validity/split_words.c - Flag and number checks
Validity/checkers.c - Input utilities
Validity/utils.c - Duplicate checks
Validity/duplicates.c
Stack construction
- Stack builder
Stack_building.c
Sorting strategies
- Strategy selection
Validity/determine_the_way.c - Algorithm dispatcher
ft_Execution.c - Simple sort
algorithm/simple.c - Medium sort
algorithm/medium.c - Complex sort
algorithm/complex.c - Sort helpers
algorithm/helper_algo.c
Stack operations
- Stack commands
Move/Switching_movements.c - Movement helpers
Move/helper.c
Other components
- CLI user
- Program entry
main.c
Connections 15
- CLI user → Program entry: provides arguments
main.c - Program entry → Flag and number checks: checks arguments
main.c - Program entry → Argument splitting: splits arguments
main.c - Program entry → Stack builder: builds stack
main.c - Program entry → CLI user: prints stack
main.c - Flag and number checks → Input utilities: validates values
Validity/checkers.c - Flag and number checks → Duplicate checks: checks duplicates
Validity/checkers.c - Stack builder → Input utilities: parses integers
Stack_building.c - Algorithm dispatcher → Simple sort: dispatches to
ft_Execution.c - Algorithm dispatcher → Medium sort: dispatches to
ft_Execution.c - Algorithm dispatcher → Complex sort: dispatches to
ft_Execution.c - Simple sort → Stack commands: issues commands
algorithm/simple.c - Medium sort → Stack commands: issues commands
algorithm/medium.c - Medium sort → Sort helpers: uses helpers
algorithm/medium.c - Stack commands → Movement helpers: uses primitives
Move/Switching_movements.c