Skip to content

About

Codewars katas + verified solutions — the space bender

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

space-bender

Codewars katas + verified solutions — the space bender.

A curated collection of solved katas, each with its solution, a README.md explaining the approach, and tests that verify the solution exhaustively (Python suites for the Python katas, a Node harness against the real @codewars/lambda-calculus compiler for the λ Calculus ones). Solutions are written from first principles and verified locally before being recorded here.

Katas

2 kyu

Kata Solution Approach
Evaluate mathematical expression calc.py Recursive descent parser, no eval
Simpler Interactive Interpreter interpreter.py Recursive descent REPL with variable state
Regular Expression parser regexp.py Recursive descent AST builder
Prime Streaming (NC-17) primes.py Segmented sieve, C-level bytearray + regex
Divisible by 0b111 (7) solution.py 7-state DFA → state elimination → regex

3 kyu

Kata Solution Approach
Loopover solution.py Local 3-cycles (swap_adj, three_slip) + parity

6 kyu

Kata Solution Approach
Basics 08: next higher with same bits (λ Calculus) solution.lc BinaryScott Gosper walk — Even/Odd wrap accumulators

7 kyu

Kata Solution Approach
Number Pairs (λ Calculus) solution.lc Church lists + pred-trick tail + monus max
Fibonacci (λ Calculus) solution.lc Scott pair-iteration + lazy Scott add via Z
Spinning Rings (λ Calculus) solution.lc Scott ring-state walk (decw/incw) + Z structural eq

Kumite

Kata Solution Approach
Finding the duplicate number (Haxe) solution.hx Single O(n) seen-map pass vs length-branched baseline

Running tests

python3 katas/2kyu/divisible-by-7/test_solution.py
python3 katas/3kyu/loopover/test_solution.py
npm install --prefix katas/7kyu/number-pairs && node katas/7kyu/number-pairs/test.mjs
npm install --prefix katas/6kyu/basics-08-next-higher && node katas/6kyu/basics-08-next-higher/test.mjs
npm install --prefix katas/7kyu/fibonacci && node katas/7kyu/fibonacci/test.mjs
npm install --prefix katas/7kyu/spinning-rings && node katas/7kyu/spinning-rings/test.mjs

the constellation · 0 + 1 · fine touch from within · vaked.dev

About

Codewars katas + verified solutions — the space bender

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages