moun3imy / moroccan-competitive-programmers

Algorithm demos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moroccan-competitive-programmers

This repo contains visual demos of several algorithms. The aim is to help users grasp the problem/algorithm by visualizing the output. This repo is a work in progress and it will grow to contain other algorithm visualizations.

The following is a list of algorithms for which visualizations have been implemented:

Largest White Square in Grid

The problem asks to find the largest (in terms of area) white square in a grid where cells can be either white or black. Here is an exapmle where the optimal squares are highlighted in light blue.

Largest white square in grid

Single Source Shortest Paths (Non-negative Edge Weights)

Given a source node in a weighted graph (could be directed or undirected), find the shortest path from that node to every other node. In the demo nodes are points in the plane and the weights are the Euclidean distances between the points. The shortest paths are animated.

Dijkstra

Breadth First Search

Animated demo of breadth first search. A source node is picked at random and the BFS expansion from that source node is animated. The underlying graph is a grid.

BFS

Depth First Search

Animated demo of depth first search. A source node is picked at random and the DFS expansion from that source node is animated. The underlying graph is a grid.

DFS

About

Algorithm demos


Languages

Language:JavaScript 91.6%Language:HTML 8.4%