Skip to content

hashemi/SwiftProtohackers

Repository files navigation

SwiftProtohackers

This repository contains solutions to Protohackers challenges. The solutions are written in Swift using Swift NIO and Swift Collections (for SortedSet).

It currently contains solutions to all 11 problems:

  1. Smoke Test
  2. Prime Time
  3. Means to an End
  4. Budget Chat
  5. Unusual Database Program
  6. Mob in the Middle
  7. Speed Daemon
  8. Line Reversal
  9. Insecure Sockets Layer
  10. Job Center
  11. Voracious Code Storage
  12. Pest Control

Each solution is in it's own Swift file like Sources/SwiftProtohackers/00-SmokeTest.swift for the first problem.

To start the server, run the following command in main directory:

swift run

This will bind to 0.0.0.0 at port 9999 and run the server serving the solution to the most recent problem solved (right now, that would be "10. Voracious Code Storage"). To serve older solutions you'd have to checkout an earlier commit. The repo is organized with 1 flattened commit per problem solved.

About

Solutions to protohackers.com problems in Swift NIO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages