Skip to content

🧩 Comprehensive algorithms & data structures in TypeScript/JavaScript. 500+ coding interview solutions, HackerRank problems, system design patterns. Perfect for technical interview preparation and competitive programming.

License

Notifications You must be signed in to change notification settings

vuquangkhtn/problems-solving

Repository files navigation

🧩 Problem Solving Algorithms & Data Structures Repository

TypeScript JavaScript Yarn ESLint Prettier MIT License GitHub Stars GitHub Forks

🎯 Master Coding Interviews & Competitive Programming | πŸ“š Learn Data Structures & Algorithms | πŸš€ System Design Patterns

A comprehensive open-source collection of problem-solving algorithms, data structures, and system design implementations in TypeScript/JavaScript. Perfect for coding interview preparation, competitive programming, and computer science education. This monorepo contains 500+ solutions for various coding challenges including HackerRank problems, LeetCode-style questions, algorithmic implementations, and scalable system design patterns.

πŸ” Keywords: algorithms data-structures coding-interview hackerrank leetcode typescript javascript competitive-programming system-design interview-preparation computer-science software-engineering dynamic-programming graph-algorithms technical-interview

πŸ“ Project Structure

.
β”œβ”€β”€ codespaces/
β”‚   β”œβ”€β”€ hackerrank/           # HackerRank challenge solutions
β”‚   β”‚   β”œβ”€β”€ DynamicProgram/   # Dynamic programming problems
β”‚   β”‚   β”œβ”€β”€ Strings/          # String manipulation problems
β”‚   β”‚   β”œβ”€β”€ MultiPointers/    # Two-pointer technique problems
β”‚   β”‚   β”œβ”€β”€ Search/           # Search algorithm problems
β”‚   β”‚   β”œβ”€β”€ Sortings/         # Sorting algorithm problems
β”‚   β”‚   β”œβ”€β”€ Implementation/   # Implementation challenges
β”‚   β”‚   └── Constructive Algo/ # Constructive algorithms
β”‚   β”œβ”€β”€ MergeInterval/        # Merge interval algorithm implementations
β”‚   └── system-design/       # System design patterns and solutions
β”œβ”€β”€ package.json              # Root package.json with workspace configs
β”œβ”€β”€ tsconfig.base.json        # Base TypeScript configuration
└── eslint.base.js           # Base ESLint configuration

πŸš€ Workspaces

  • @problem-solving/hackerrank: Comprehensive solutions to HackerRank challenges organized by category
  • @problem-solving/algorithms: Implementation of classic algorithms and merge interval problems
  • @problem-solving/system-design: System design problems, patterns, and architectural solutions

πŸ› οΈ Tech Stack

  • TypeScript/JavaScript - Primary programming languages
  • Node.js - Runtime environment
  • Yarn Workspaces - Monorepo management
  • ESLint - Code linting and quality assurance
  • Prettier - Code formatting
  • ts-node - TypeScript execution environment

🏁 Getting Started

Prerequisites

  • Node.js (version 18+)
  • Yarn package manager

Installation

# Clone the repository
git clone <repository-url>
cd problems-solving

# Install dependencies for all workspaces
yarn install

Development Commands

# Build all workspaces
yarn build

# Start development mode (runs React workspace)
yarn dev

# Lint all workspaces
yarn lint

# Fix linting issues across all workspaces
yarn lint:fix

# Format code in all workspaces
yarn format

# Type check all workspaces
yarn type-check

# Clean build artifacts
yarn clean

πŸ“ Workspace-specific Commands

You can run commands for individual workspaces:

# HackerRank solutions
yarn workspace @problem-solving/hackerrank dev
yarn workspace @problem-solving/hackerrank build
yarn workspace @problem-solving/hackerrank lint

# Algorithm implementations
yarn workspace @problem-solving/algorithms dev
yarn workspace @problem-solving/algorithms build

# System design
yarn workspace @problem-solving/system-design dev
yarn workspace @problem-solving/system-design build

πŸ“š Problem Categories

HackerRank Solutions

  • Dynamic Programming: Optimal substructure and overlapping subproblems
  • String Algorithms: Pattern matching, anagrams, and string manipulation
  • Two Pointers: Efficient array/string traversal techniques
  • Search Algorithms: Binary search, linear search variations
  • Sorting Algorithms: Custom sorting implementations and applications
  • Implementation: Logic and simulation problems
  • Constructive Algorithms: Building solutions step by step

Core Algorithms

  • Merge Intervals: Overlapping interval problems and solutions
  • Data Structures: Implementation of fundamental data structures
  • Graph Algorithms: Traversal, shortest path, and connectivity problems

System Design

  • Scalability Patterns: Load balancing, caching, database sharding
  • Architecture Patterns: Microservices, event-driven architecture
  • Distributed Systems: Consensus algorithms, fault tolerance

πŸ§ͺ Running Solutions

Most solutions can be executed directly:

# Run a specific TypeScript solution
cd codespaces/hackerrank/DynamicProgram/CommonChild
ts-node index.ts

# Run JavaScript solutions
node solution.js

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-algorithm)
  3. Commit your changes (git commit -am 'Add new algorithm implementation')
  4. Push to the branch (git push origin feature/new-algorithm)
  5. Create a Pull Request

Code Style

  • Follow TypeScript/JavaScript best practices
  • Use meaningful variable and function names
  • Add comments for complex algorithms
  • Include time and space complexity analysis
  • Ensure all linting rules pass

πŸ“„ License

This project is open source and available under the MIT License.

πŸ“§ Contact

For questions or suggestions, please open an issue or reach out via email.


⭐ Star this repository if you find it helpful!

About

🧩 Comprehensive algorithms & data structures in TypeScript/JavaScript. 500+ coding interview solutions, HackerRank problems, system design patterns. Perfect for technical interview preparation and competitive programming.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •