Two sum in every language
Completed:
- C — by @cbangera2
- C# — by @cbangera2
- C++ — by @cbangera2
- Dart — by @cbangera2
- Go — by @cbangera2
- Java — by @cbangera2
- JavaScript — by @cbangera2
- Kotlin — by @cbangera2
- Python — by @cbangera2
- Swift — by @cbangera2
- Zig — by @cbangera2
TODO:
- Crystal
- Elixir
- Fortran
- F#
- Haskell
- Julia
- Lua
- Nim
- OCaml
- PHP
- R
- Ruby
- Rust
- Scala
- TypeScript
Run the whole suite:
./scripts/run_all.shAdd a new language:
- Drop your source under a new folder (keep the pattern
<lang>/...). - Implement the optimal
$O(n)$ hash-map Two Sum and print<Language>: OKafter self-checks. - Wire the build/run commands into
scripts/run_all.sh. - Add a job for it in
.github/workflows/ci.ymlso CI runs it (mirror the simple pattern used by the others). - Make sure the GitHub Action still passes.