alt-art / cycle-detection

Simple algorithm to detect cycles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cycle detection in linked lists

This is a simple implementation of a cycle detection algorithm for linked lists. It uses the Floyd's cycle-finding algorithm.

Running the typescript version

yarn install
yarn start

Running the rust version

cd rust-version
cargo run

Initialy I wrote the rust version, but I realized that the rust version will be much more verbose than the typescript version. So I decided to write the typescript version to see how I could make the rust version more concise.

Reference

About

Simple algorithm to detect cycles


Languages

Language:Rust 81.7%Language:TypeScript 18.3%