Skip to content

About

My solutions to codingchallenges.fyi — Kotlin + GraalVM native images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Code Challenges

My solutions to Coding Challenges by John Crickett — built from scratch in Kotlin with GraalVM native images.

Each challenge is a standalone Gradle subproject under challenges/ with its own tests, native binary, and write-up.

Challenges

# Challenge Problem Description
1 wc Challenge Word, line, byte & character counting
2 json-parser Challenge Recursive-descent JSON lexer & parser
3 compression-tool Challenge Huffman coding compression
4 cut-tool Challenge Field extraction (delimiters & byte ranges)
5 load-balancer Challenge HTTP reverse proxy with health checks
6 sort-tool Challenge Four sorting algorithms (merge, quick, heap, radix)
7 calculator Challenge Shunting-yard expression evaluator
8 redis-server Challenge RESP protocol server with virtual threads
9 grep Challenge Line-by-line regex pattern matching
10 uniq Challenge Streaming adjacent-duplicate filtering
11 web-server Challenge HTTP/1.1 server from raw sockets
12 url-shortener Challenge SHA-256 hashing & REST API from raw sockets
13 diff Challenge Longest common subsequence diff
14 shell Challenge REPL with pipes, builtins & job control
15 cat Challenge File concatenation & line numbering
16 irc-client Challenge Real-time IRC chat over raw TCP

Tech Stack

  • Kotlin on JDK 21
  • GraalVM Native Image (Oracle GraalVM 24) for AOT-compiled binaries
  • JUnit 5 for testing
  • Gradle multi-project build with shared conventions

Getting Started

# Build & test a specific challenge
./gradlew :challenges:wc:test

# Build native binary
./gradlew :challenges:wc:nativeCompile

# Install to /usr/local/bin (requires sudo)
./gradlew :challenges:wc:install

Project Structure

challenges/
  wc/                  # Each challenge is a standalone subproject
    src/main/kotlin/   # Implementation
    src/test/kotlin/   # Tests
    ARTICLE.md         # Write-up explaining the approach
    build.gradle.kts   # Applies shared challenge-conventions plugin
buildSrc/              # Shared Gradle convention plugin

Each challenge includes an ARTICLE.md with a detailed write-up covering the design, algorithms, and usage.

About

My solutions to codingchallenges.fyi — Kotlin + GraalVM native images

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages