How zerrikhalid/push_swap works
Project type and purpose
• Push_swap is a command-line, algorithmic sorting tool written in C.
• It actually consists of two programs:
• push_swap: computes and prints a minimal sequence of stack instructions to sort a list of integers.
• checker: reads a sequence of stack instructions from standard input, applies them to its own copy of the stacks, and reports OK/KO.
File structure
• Top-level files and directories:
• Makefile, README.md, push_swap.h (project config and header)
• algo/ — sorting-algorithm implementations (algo1.c, algo2.c, etc.)
• get_next_line/ — minimal I/O helper for checker reading instructions
• instruction/ — implementations of the primitive stack operations (sa, sb, pa, pb, …)
• parsing/ & parsing_bonus/ — argument parsing, validation, indexing, string utilities
• lst_*.c — singly linked-list utilities (add, last, size)
• main.c & mainC.c — entry points for push_swap and checker
• Patterns: functional decomposition by concern (parsing, data structures, algorithm, I/O, instructions).
README for additional insights
• Describes the two executables, their roles, and constraints (allowed functions, compile flags).