Edgar-Avila / Sort-Visualizer-CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI Algorithm Visualizer

This project is a Linux only Algorithm Visualizer that you can use directly from your command line. It has controls that allow you to perform different actions so you can better understand the inner workings of the sorting and pathfinding algorithms.

Commands

Sorting

To visualize sorting algorithms, use the sort command

sort.mp4
  • s to shuffle
  • h to slow down
  • l to speed up

Shortest path

To visualize pathfinding algorithms use the path command

path.mp4

Path Setup

Draw obstacles for the algorithm to avoid!

  • Mouse/hjkl to move the cursor
  • Left click/space to toggle an obstacle
  • Enter to start the visualizer

Path Visualize

See the algorithm navigating and avoiding the obstacles!

  • Enter to go back to setup mode
  • h to slow down
  • l to speed up

Options

  • (-h, --help) Will display all the options (app)
  • (-a, --algo) Sorting algorithm used (sort, path)
  • (-s, --speed) Speed of the visualizer (sort, path)
  • (-n, --number) Number of elements (sort)
  • (-d, --dimensions) Width and height of the visualizer (path)
  • (-D, --diagonal) Allow diagonal movement (path)

Development

To compile the project you need g++ ,the ncurses library and make, then just run make. This will produce an executable app that you can use.

About

License:MIT License


Languages

Language:C++ 100.0%Language:Makefile 0.0%