A collection of absurd, convoluted, and rather impractical algorithms.
This repository contains various algorithms that intentionally designed to be awful in nature, implemented in Java. The algorithms take a different and more creative/convoluted approach to solving a "problem" (i.e. recreational parodies) that is traditionally trivial to solve, or is already solved by well-known and efficient means. As a consequence, they may have horrendously intolerable asymptotic time and/or memory complexity (i.e. extremely computationally intensive), and are woefully impractical for production.
It is not wise to take any algorithms here seriously; however, their implementations may solve some unique challenges brought on by a convoluted approach.
- parity: testing whether an integer's parity is even or odd
- lcm (WIP): A "lookup table" based on a large
BigInteger
least-common multiple of1, 3, 5, ..., 2^31 - 3, 2^31 - 1
(i.e. up to max integer) and tests parity based on division remainders.
- lcm (WIP): A "lookup table" based on a large
- ...more to come, in due time
Disclaimer: not all algorithms may necessarily be original ideas; however, they are original implementations.