Case Study

Automated DSA Questions Tracker

Automating the practice of data structures and algorithms with Python

April 2025 - Present2 months

Type

Personal Project

Status

Ongoing

Duration

2 months

Primary Tools

Python, Jupyter Notebook, Git

Project Overview

The Automated DSA Questions Tracker is a tool I developed to streamline the process of practicing data structures and algorithms problems. It helps track progress through the NeetCode 150, a curated list of essential coding interview questions, by automating the fetching, organizing, and validating of solutions.

Automated DSA Questions Tracker screenshot

Why Automate DSA Practice?

As a technology professional continually honing my skills, I recognized several pain points in the traditional approach to practicing DSA problems that could be improved through automation:

  • Time Management: Manually tracking progress across multiple platforms and question categories is time-consuming and error-prone.
  • Organization: Solutions often become scattered across different files and folders without a consistent structure.
  • Consistency: Without a systematic approach, it's easy to focus too much on certain topics while neglecting others.
  • Validation: Manually testing solutions for correctness is tedious and can miss edge cases.
  • Version Control: Keeping a clean history of solution attempts and improvements is challenging without automation.

Technology Stack

I selected technologies that would provide flexibility, ease of use, and strong ecosystem support:

Technical Stack

PythonJupyter NotebookGitData StructuresAlgorithmsAutomationWeb ScrapingAIArtificial Intelligence

Core Technologies

  • Python: Primary language for all scripts and automation
  • Jupyter Notebook: For interactive development and data exploration
  • Git: Version control for tracking solution progress
  • Web Scraping: To fetch question data from NeetCode

Tools & Libraries

  • Pandas: For data manipulation and CSV management
  • BeautifulSoup/Selenium: For web scraping
  • pytest: For solution validation
  • argparse: For CLI interface

System Architecture

The project is organized with a clean, modular architecture that separates concerns and makes it easy to maintain and extend:

Project Structure

Automated-DSA/ ├── questions/               # Solutions organized by category/difficulty ├── questions.csv           # CSV with all questions & tracking info ├── src/                    # Source code │   ├── main.py             # Main script to run the workflow │   ├── scrapers/           # Scripts to fetch questions │   ├── templates/          # Solution templates │   └── utils/              # Utility functions ├── requirements.txt        # Python dependencies └── README.md               # Documentation

Core Components

Question Fetcher

Automatically scrapes NeetCode 150 questions and metadata, organizing them by category and difficulty.

Solution Generator

Creates templated Python files with problem descriptions, constraints, and solution scaffold.

Progress Tracker

Maintains a CSV database of questions with completion status, attempt counts, and notes.

Solution Validator

Automatically tests solutions against sample cases and custom test cases to verify correctness.

Implementation Details

1. Question Fetching & Processing

The system obtains questions from NeetCode 150 through web scraping. Each question is processed to extract:

  • Title and URL
  • Difficulty level (Easy, Medium, Hard)
  • Category (Arrays & Hashing, Two Pointers, etc.)
  • Problem description and constraints
  • Sample test cases

This data is then saved to a CSV file that serves as the central database for the system, allowing easy filtering, sorting, and tracking of progress.

2. Solution Organization

Solutions are organized in a structured directory hierarchy based on category and difficulty:

questions/ ├── arrays_hashing/ │   ├── easy/ │   │   ├── contains_duplicate.py │   │   ├── valid_anagram.py │   │   └── ... │   ├── medium/ │   │   └── ... │   └── hard/ │       └── ... ├── two_pointers/ │   └── ... └── ...

This organization makes it easy to focus on specific categories or difficulty levels during practice sessions.

3. Solution Templates

When a new question is selected for solving, the system generates a Python file with:

  • Full problem description in docstring format
  • Input/output constraints and examples
  • Function signature with appropriate type hints
  • Test cases derived from the problem description
  • Space for notes and algorithm explanation
"""
Contains Duplicate

Given an integer array nums, return true if any value appears at least twice in the array, 
and return false if every element is distinct.

Example 1:
Input: nums = [1,2,3,1]
Output: true

Example 2:
Input: nums = [1,2,3,4]
Output: false

Example 3:
Input: nums = [1,1,1,3,3,4,3,2,4,2]
Output: true

Constraints:
1 <= nums.length <= 10^5
-10^9 <= nums[i] <= 10^9
"""
from typing import List

def contains_duplicate(nums: List[int]) -> bool:
    # TODO: Implement your solution here
    pass

# Test cases
test_cases = [
    ([1,2,3,1], True),
    ([1,2,3,4], False),
    ([1,1,1,3,3,4,3,2,4,2], True)
]

for i, (nums, expected) in enumerate(test_cases):
    result = contains_duplicate(nums)
    print(f"Test {i+1}: {'PASS' if result == expected else 'FAIL'}")

4. Automated Testing

3. Solution Templates

When a new question is selected for solving, the system generates a Python file with:

  • Full problem description in docstring format
  • Input/output constraints and examples
  • Function signature with appropriate type hints
  • Test cases derived from the problem description
  • Space for notes and algorithm explanation
def contains_duplicate(nums: List[int]) -> bool:
    # Using a hash set for O(n) time complexity
    seen = set()
    for num in nums:
        if num in seen:
            return True
        seen.add(num)
    return False

4. Automated Testing

The system provides multiple levels of solution validation:

  • Basic test cases included in each solution file for quick validation
  • Comprehensive test suite with edge cases for thorough verification
  • Performance metrics to identify inefficient solutions
  • Comparison against optimal solutions for learning purposes

5. Git Integration

A key feature of the system is its Git integration, which automatically:

  • Commits new solutions with standardized commit messages
  • Tracks solution improvements over time
  • Records progress statistics and completion milestones
  • Maintains a clean, organized history of DSA practice

Workflow Example

The following example demonstrates a typical workflow using the Automated DSA Questions Tracker:

Step 1: Initial Setup

$ python -m main --fetch

This command fetches all NeetCode 150 questions and creates the questions.csv file with metadata.

Step 2: Get a New Question

$ python -m main --new --category "Arrays & Hashing" --difficulty Easy

This generates a new solution file for an easy Arrays & Hashing problem that hasn't been completed yet.

Step 3: Implement the Solution

The developer opens the generated file and implements their solution to the problem.

def contains_duplicate(nums: List[int]) -> bool:
    # Using a hash set for O(n) time complexity
    seen = set()
    for num in nums:
        if num in seen:
            return True
        seen.add(num)
    return False

Step 4: Test the Solution

$ python -m main --test questions/arrays_hashing/easy/contains_duplicate.py

This runs the solution against test cases and verifies correctness and performance.

Step 5: Commit the Solution

$ python -m main --commit

This automatically commits the new solution to Git and updates the questions.csv file to mark the problem as completed.

Key Benefits

50%

Reduction in time spent on setup and organization

100%

Consistent structure across all solutions

2x

Increase in number of problems solved per practice session

3x

Better coverage of different problem categories

Additional Benefits

  • Focus on Problem Solving: By automating routine tasks, users can focus entirely on algorithm design and implementation.
  • Comprehensive Progress Tracking: Easily see which categories need more practice and track improvement over time.
  • Learning Reinforcement: Structured approach helps reinforce patterns and solutions across related problems.
  • Interview Readiness: Systematic coverage of the NeetCode 150 ensures comprehensive preparation for technical interviews.
  • Portfolio Building: Creates a well-documented repository of DSA solutions that can be showcased to potential employers.

Future Enhancements

While the current implementation provides significant value, several enhancements are planned for future iterations:

Planned Features

  • Time Complexity Analysis: Automated analysis of solution time and space complexity.
  • Solution Comparisons: Tool to compare different approaches to the same problem.
  • Spaced Repetition: Intelligent scheduling of problems for review based on past performance.
  • Web Interface: Browser-based dashboard for tracking progress and viewing solutions.
  • AI Integration: Use of LLMs to provide hints or review solutions when stuck.

Conclusion

The Automated DSA Questions Tracker demonstrates how automation can significantly enhance the learning and practice experience for data structures and algorithms. By removing the friction from routine tasks like organization, validation, and progress tracking, it allows practitioners to focus more deeply on problem-solving skills and algorithm design.

This project showcases not only technical skills in Python and automation but also a methodical approach to learning and skill development. The system's architecture emphasizes modularity, maintainability, and extensibility—principles that apply broadly across software engineering.

As technical interviews continue to emphasize algorithmic problem-solving abilities, tools like this can provide a competitive advantage through more efficient and comprehensive preparation. The project continues to evolve with new features and improvements based on ongoing usage and feedback.

Interested in Automation Tools?

I can help your organization build custom automation solutions to improve productivity and streamline workflows.