/coding-challenges

Solution to the Coding Challenges by John Crickett: https://codingchallenges.fyi

Primary LanguageTypeScriptMIT LicenseMIT

Solutions to John Crickett's Coding Challenges

About

This repository contains my solutions to John Crickett's Coding Challenges. The challenges are available at https://codingchallenges.fyi/challenges/intro.

Language used - Typescript

Checkout my Notion where I share how I tackled these challenges, along with my learnings.

Challenges

  1. Write your own wc tool
  2. Write your own JSON parser
  3. Write Your own Compression Tool
  4. Write Your own cut Tool
  5. Write Your own Load Balancer
  6. Write Your own Sort Tool
  7. Write Your own Calculator
  8. Write Your own Redis Server
  9. Write your own grep
  10. Write Your own uniq Tool
  11. Write Your own Web Server
  12. Write Your own URL Shortener
  13. Write Your own diff Tool
  14. Write Your own Shell
  15. Write Your own cat Tool
  16. Write Your own IRC Client
  17. Write Your own Memcached Server
  18. Write Your own Spotify Client
  19. Write Your own Discord Bot
  20. Write Your own LinkedIn Carousel Generator
  21. Write Your own Sed
  22. Write Your own DNS Resolver
  23. Write Your own Traceroute
  24. Write Your own Realtime Chat Client and Server - Duplicate of Write Your Own IRC Client
  25. Write Your own NATS Message Broker
  26. Write Your own Git
  27. Write Your own Rate Limiter
  28. Write Your own NTP Client

...

  1. Write Your Own HTTP(S) Load Tester

Installation

The following command will build all the .ts files present in the src folder into a new build folder.

npm install
npm run build

Testing

The following command will run all the tests under the __tests__ folder and create the coverage report in the coverage folder.

All the required test input files are in the individual __tests__ folder for each challenge.

npm test

To run tests for a specific challenge, use the following command:

# npm test src/<challenge-number>/
npm test src/2/
npm test src/3/