← Back to donnemartin/interactive-coding-challenges

How to Deploy & Use donnemartin/interactive-coding-challenges

Interactive Coding Challenges - Deployment and Usage Guide

Prerequisites

  • Python 3.x - Required for running the interactive coding challenges
  • Jupyter Notebook - Required to run the .ipynb files
  • Anki - Optional, for using the provided flashcards (available at apps.ankiweb.net)
  • Git - Required for cloning the repository

Installation

  1. Clone the repository:

    git clone https://github.com/donnemartin/interactive-coding-challenges.git
    cd interactive-coding-challenges
    
  2. Set up a virtual environment (recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Install Jupyter Notebook:

    pip install jupyter
    

Configuration

No specific configuration is required for the coding challenges themselves. However:

  • Anki Flashcards: Download and install Anki from apps.ankiweb.net to use the provided .apkg files
  • Binder: You can run the challenges online using the Binder badge in the README without any local setup

Build & Run

Running Locally

  1. Start Jupyter Notebook:

    jupyter notebook
    
  2. Navigate to the repository in your browser and open any of the challenge notebooks:

    • Challenge notebooks end with _challenge.ipynb
    • Solution notebooks end with _solution.ipynb
  3. Run the cells in the notebook to execute the challenges and tests

Using Online (Binder)

Click the Binder badge in the README to run the challenges in your browser without any installation: Binder

Deployment

This project is designed as a learning resource and doesn't require deployment. However, you can:

  • Share notebooks by uploading them to GitHub or other platforms that support Jupyter Notebooks
  • Use Binder for collaborative learning sessions
  • Create your own flashcards using Anki for personalized study

Troubleshooting

Common Issues and Solutions

IssueSolution
ModuleNotFoundError when running notebooksEnsure you've installed all dependencies with pip install -r requirements.txt
Jupyter Notebook won't startMake sure Jupyter is installed: pip install jupyter
Anki flashcards won't importMake sure you're using the latest version of Anki from apps.ankiweb.net
Notebook cells not executingCheck that you're running the correct Python kernel (should be Python 3.x)
Tests failing in challenge notebooksThis is expected! The tests are designed to fail until you implement the solution
Performance issues with large datasetsSome challenges may require optimization; refer to the solution notebooks for efficient implementations

Performance Tips

  • Use the provided solution notebooks as references for optimal algorithms
  • Pay attention to the Big-O time and space complexity discussions in each solution
  • For data structure implementations, the reference implementations are unit tested and production-ready

Learning Resources

  • Refer to the System Design Primer for system design interview preparation
  • Use the incremental hints feature (coming soon) for guided problem-solving
  • Review the algorithm discussions and complexity analyses in solution notebooks