Skip to content

Files

Latest commit

 

History

History

sorting-stacks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Sorting Stacks

This repository contains the source code of an algorithm to sort N stacks with N values considering stacks limitations for removing nodes (can only pop first node), developed by:

Developers

Ramón Álvarez (ralvarezdev).

Programming Languages

Only C++.

Installation

  1. Clone this repository to your local machine using the following command:

    git clone https://github.com/ralvarezdev/uru-dsa

  2. Change your Current Working Directory to where the repository was cloned
  3. Move to 'sorting-stacks' directory
  4. There are two ways to compile the program:
    1. With G++ (you must have installed MinGW Compiler). Use the following command:
      Command for Windows

      g++ -o bin\SortingStacks.exe src\main.cpp src\lib\namespaces.h src\lib\algorithm\modHanoi.h src\lib\algorithm\modHanoi.cpp src\lib\terminal\ansiEsc.h src\lib\terminal\ansiEsc.cpp src\lib\terminal\input.cpp src\lib\terminal\input.h

      Command for Linux

      g++ -o bin/SortingStacks.exe src/main.cpp src/lib/namespaces.h src/lib/algorithm/modHanoi.h src/lib/algorithm/modHanoi.cpp src/lib/terminal/ansiEsc.h src/lib/terminal/ansiEsc.cpp src/lib/terminal/input.cpp src/lib/terminal/input.h

    2. With CMake (you must have installed CMake and Make). First, get to the bin folder. Use the following command
      Command for Windows

      cmake -S ..\ -G "MinGW Makefiles" -B .\ && make

      Command for Linux

      cmake -S ../ -G "MinGW Makefiles" -B ./ && make

  5. Run the program by clicking SortingStacks.exe.

For a better user experience, resize the terminal window to Fullscreen Mode

View it on Action

Sorting 6 Stacks with 6 Nodes Each