Skip to content

πŸ’‘ Real-world algorithm challenges inspired by actual interviews. Practice, debug, and grow your skills β€” one challenge at a time.

Notifications You must be signed in to change notification settings

bohdan-konovalov/algo-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Algo Challenges

Banner

Welcome to the Algo Challenges repository β€” a collection of hand-picked algorithmic coding problems inspired by real company interviews I've personally taken part in (Amazon, Bolt, and more).

This repo is built to simulate real technical interviews, promote focused problem-solving, and help you improve your data structures and algorithms skills through disciplined practice.


πŸ“š What's Inside

Challenges are organized by company name in folders like:

amazon/WatchScore
bolt/SomeOtherChallenge

Each challenge contains:

  • πŸ“„ README.md β€” problem description and sample cases
  • πŸ§ͺ __tests__/ β€” unit tests written using Jest
  • ✍️ solution/ β€” an official solution you can check after solving

🎯 How to Approach Challenges Effectively

To make the most out of your practice, follow these principles β€” just like in a real interview:

  1. Read the problem description carefully
    Pay attention to constraints, edge cases, and sample inputs/outputs.

  2. Think first, code later
    Plan your approach and write your code fully before running any tests β€” just like a real submission.

  3. Run tests only when ready
    Validate your logic using the provided Jest tests by running yarn test.

  4. If tests fail, avoid peeking

    • Try to debug without reading the test cases.
    • Use console.log or walk through your code logically to find the issue.
  5. Still stuck?

    • Then look at the failing test case(s).
    • You can compare with the official solution in the solution/ folder only after a solid personal attempt.
  6. Add complexity analysis to your solution
    At the top of your solution file, add a quick comment like:

    // Time: O(n); Space: O(1)

    This helps build the habit of analyzing code performance.


πŸš€ Getting Started

1. Clone the repository

git clone https://github.com/bohdan-konovalov/algo-challenges.git
cd algo-challenges

2. Install dependencies

yarn install

3. Run the tests

yarn test

Tests are written using Jest and scoped to individual challenges.


πŸ”‡ About Minimal Test Output

To encourage debugging and mimic real interview conditions, test output is silenced by default. When running tests, you’ll only see a summary like this:

Test Suites: 1 failed, 3 total
Tests:       5 failed, 12 total
Snapshots:   0 total
Time:        0.664 s

This gives you space to think before relying on test details.

To view full test logs:

Open the jest.config.js file and comment out the following line:

reporters: ["<rootDir>/silentSummaryReporter.js"],

Then re-run your tests with:

yarn test

This will enable detailed output including test names, errors, and stack traces.


πŸ— Project Structure

algo-challenges/
β”œβ”€β”€ amazon/
β”‚   └── WatchScore/
β”‚       β”œβ”€β”€ __tests__/
β”‚       |   └── index.test.ts
β”‚       └── solution/
β”‚       |   └── index.solution.ts
β”‚       β”œβ”€β”€ index.ts
β”‚       β”œβ”€β”€ README.md
β”œβ”€β”€ bolt/
β”‚   └── SomeOtherChallenge/
β”œβ”€β”€ .gitignore
β”œβ”€β”€ jest.config.js
β”œβ”€β”€ package.json
β”œβ”€β”€ README.md
β”œβ”€β”€ silentSummaryReporter.js
β”œβ”€β”€ tsconfig.json
└── yarn.lock

🀝 Contributing

Have a cool challenge from an interview or a fun idea?
PRs are welcome β€” just follow the folder structure and testing style.


Happy hacking, and treat every challenge like it’s your final interview round πŸ’ͺ

About

πŸ’‘ Real-world algorithm challenges inspired by actual interviews. Practice, debug, and grow your skills β€” one challenge at a time.

Topics

Resources

Stars

Watchers

Forks