Skip to content

VaibhavAcharya/code-golf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code Golf

Master the art of writing shorter code by solving programming problems with the fewest characters possible.

Overview

Code Golf is a web application that challenges you to solve programming problems in JavaScript using the fewest characters possible. Similar to golf, where the goal is to complete a course with the fewest strokes, code golf rewards brevity and clever solutions.

Features

  • Multiple Challenges: Test your skills with a variety of challenges across different difficulty levels (Easy, Medium, Hard)
  • Live Character Count: See your solution's character count updated in real-time as you type
  • Rank System: Earn rankings like Eagle, Birdie, Par, Bogey based on your solution's character count
  • Test Cases: All solutions are validated against multiple test cases to ensure correctness
  • Syntax Highlighting: Code editor with JavaScript syntax highlighting and helpful features
  • Solution Hints: View sample solutions after completing a challenge to learn optimization techniques
  • Progress Tracking: Your progress and best scores are automatically saved locally

Challenges

The platform includes a variety of challenges, such as:

  • String manipulation
  • Array transformations
  • Mathematical algorithms
  • Pattern matching
  • And more!

Each challenge includes:

  • A detailed description of the problem
  • Function signature you need to implement
  • Test cases showing expected inputs and outputs
  • Character count targets for different rankings

Rankings

Your solutions are ranked based on character count:

  • Eagle: Exceptional solution, extremely optimized
  • Birdie: Excellent solution, very well optimized
  • Par: Good solution, reasonably optimized
  • Bogey: Acceptable solution
  • Double Bogey: Solution works but needs optimization
  • Triple Bogey: Solution works but is far from optimal

Technology Stack

  • Frontend: Vanilla JavaScript with modern ES6+ features
  • Styling: Custom CSS with variables for theming
  • Code Editor: CodeMirror for syntax highlighting and editing features
  • Build Tool: Vite for fast development and optimized production builds

Contributing

Contributions are welcome! If you'd like to add new challenges, improve the UI, or fix bugs, please feel free to submit a pull request.

License

MIT

About

Master the art of writing shorter code by solving programming problems with the fewest characters possible.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published