This repository contains my solutions for the 1 Month Preparation Kit on HackerRank. The challenges are organized by difficulty: Basic, Intermediate, and Advanced. Each folder includes the code solution and an explanation of the approach used.
- basic/: Challenges focusing on fundamental programming concepts and algorithms.
- intermediate/: Challenges involving complex data structures and algorithms.
- advanced/: Challenges covering advanced topics such as dynamic programming and optimization.
- mock-tests/: Mock tests for each week's progress.
Each challenge is in its own folder with the following structure:
solution.ts
: The code implementation of the solution.README.md
: A brief explanation of the problem, the approach used, and complexity analysis.
- Node.js (v14 or later)
- npm (v6 or later)
-
Clone the repository:
git clone https://github.com/your-username/hackerrank-preparation-kit.git cd hackerrank-preparation-kit
-
Install dependencies:
npm install
npm run build
: Compile TypeScript to JavaScriptnpm test
: Run all test suitesnpm run test:watch
: Run tests in watch mode
If you want to run a specific test file, use the following command:
npx jest <challenge-name>
For example, to test the solution for the Plus Minus challenge, you can run:
npx jest plus-minus