Demonstration of search algorithms in the graph.

by Rabestro
GNU/Linux xterm-256color bash 1062 views

The project implements an interface for the weighted graph, as well as two algorithms for finding a path in the graph.

There are implementations and tests for two algorithms:

  • Breadth-first search
  • Dijkstra’s Algorithm

To demonstrate the work of search algorithms, I made a small console program. The program allows you to select one of three graph samples and search for a path using two algorithms.

Source code:https://github.com/rabestro/algorithms

More byRabestro

See all

Share this recording

Append?t=30to start the playback at 30s,?t=3:20to start the playback at 3m 20s.

Embed as image link

Use snippets below to display a screenshot linking to this recording.
Useful in places where scripts are not allowed (e.g. in a project's README file).

HTML:

Markdown:

Embed the player

If you're embedding on your own page or on a site which permits script tags, you can use the full player widget:

Paste the above script tag where you want the player to be displayed on your page.


Seeembedding docs for additional options.

Download this recording

You can download this recording inasciicast v2 format, as a .cast file.

Download

Replay in terminal

You can replay the downloaded recording in your terminal using theasciinema play command:

asciinema play 468058.cast

If you don't have asciinema CLI installed thensee installation instructions.

Use with stand-alone player on your website

Download asciinema player from the releases page (you only need.js and.css file), then use it like this:

<!DOCTYPE html><html><head>  <link rel="stylesheet" type="text/css" href="asciinema-player.css" /></head><body>  <div></div>  <script src="asciinema-player.min.js"></script>  <script>    AsciinemaPlayer.create(      '/assets/468058.cast',      document.getElementById('player'),      { cols: 88, rows: 22 }    );  </script></body></html>

See asciinema player quick-start guide for full usage instructions.

Generate GIF from this recording

While this site doesn't provide GIF conversion at the moment, you can still do it yourself with the help of asciinema GIF generator utility -agg.

Once you have it installed, generate a GIF with the following command:

agg https://asciinema.org/a/468058 demo.gif

Or, if you already downloaded the recording file:

agg demo.cast demo.gif

Checkagg --help for all available options. You can change font family and size, select color theme, adjust speed and more.

Seeagg manual for full usage instructions.