A tool to filter LeetCode problems by exact topics, ensuring you get problems that match ALL specified topics rather than problems that match ANY of them.
Live Demo: https://leetcode-topics-filtering.vercel.app/
- Exact Topic Matching: The main advantage is the ability to filter for problems that match all specified topics, whereas LeetCode's default filter shows problems that match any of the selected topics. This is especially useful when you want to practice problems with a specific combination of topics.
- Speed: The pre-built index of known problems makes the filtering process very fast, as it avoids the need for slow web scraping on every request.
- Comprehensive Topic Database: Uses a large database of over 3,500 LeetCode problems with their associated topics, eliminating the need for real-time scraping for known problems.
- Simple UI: The user interface is clean and straightforward, focusing on the core filtering functionality without the clutter of the LeetCode website.
- Filter LeetCode problems by exact topic matches
- Get problems that contain ALL specified topics (e.g., "array" AND "hash table")
- Clean, intuitive user interface with loading indicators
- Ultra-fast results with efficient indexing (O(1) lookup)
- VS Code extension integration
- Pre-built database of problem topics (no scraping needed for known problems)
- Modern, responsive design with glassmorphism effects and animations
-
Clone this repository:
git clone https://github.com/your-username/leetcode-topic-filter.git -
Navigate to the project directory:
cd leetcode-topic-filter -
Install dependencies:
npm install
-
Start the server:
npm start -
Open your browser and go to
http://localhost:3000 -
Enter topics separated by commas (e.g., "array, hash table")
-
Click "Filter Problems" to see results
- The tool uses Puppeteer to scrape LeetCode's problem pages
- It fetches problems and their associated tags
- It filters problems to show only those that match ALL specified topics
- Results are cached for 30 minutes to improve performance
- Improved error handling for network issues and page structure changes
- Content-based topic detection for problems without explicit tags
To run in development mode:
npm run dev
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.