Skip to content

Latest commit

 

History

History
82 lines (52 loc) · 3.7 KB

File metadata and controls

82 lines (52 loc) · 3.7 KB

LeetCode Snippets Logo

LeetCode Snippets

English | 中文

A powerful Chrome/Edge browser extension to help LeetCode users write code more efficiently on the platform's editor.

Features

⚡️ Algorithm Templates: Built-in high-frequency algorithm templates curated by 灵茶山艾府 (DFS, Dijkstra, Segment Tree with Lazy Propagation, etc.)

🌍 Multi-Language Support: Supports C++, Java, Python, Go - the four most popular competitive programming languages. Switch between them with one click.

🌗 Perfect Theme Adaptation: Seamlessly switches between dark/light mode to match LeetCode's native theme.

🛠️ Built-in Code Editor:

  • Syntax highlighting powered by PrismJS
  • Add, edit, and manage your own templates
  • Multi-language version management and renaming

📚 Built-in Template List

This project includes algorithm templates shared by @灵茶山艾府(0x3f) in the LeetCode discussion forum:

Reference: Scientific Problem-Solving Guide

  • Data Structures: Segment Tree (Lazy Propagation), Fenwick Tree, Union-Find, Monotonic Stack, Trie, Monotonic Queue
  • String Algorithms: KMP, Z-Algorithm (Extended KMP)
  • Graph Algorithms: BFS, DFS, Dijkstra (with heap optimization), Floyd-Warshall, Topological Sort, Kruskal's Algorithm, Bipartite Coloring
  • Mathematics: GCD/LCM, Sieve of Eratosthenes, Prime Factorization, XOR Linear Basis
  • Dynamic Programming: Digit DP, Rerooting DP, Subset Sum DP
  • Basic Algorithms: Binary Search, Sliding Window, 2D Prefix Sum
  • Computational Geometry: Convex Hull (Andrew's Algorithm)

And more algorithm templates.

Installation

Now available on the Chrome Web Store. Click the button below to install.

chrome-store-badge

Changelog

v1.1.0 (2026-05-08)

  • ✨ New templates: XOR Linear Basis (Maximum XOR Sum), 2D Prefix Sum, Convex Hull (Andrew's Algorithm)
  • ✨ Added C++ / Go versions for Prime Factorization template
  • ✨ New template: Prime Factorization with LPF (Least Prime Factor) Preprocessing

v1.0.1 (2026-05-08)

  • 🐛 Fixed toggle button remaining visible when sidebar is open
  • 📝 Added README and version changelog

v1.0.0 (2026-05)

  • 🎉 Initial release
  • ⚡ Built-in high-frequency algorithm templates curated by 0x3f
  • 🌍 Support for C++, Java, Python, and Go with one-click language switching
  • 🌗 Dark/light theme adaptation matching LeetCode's design
  • 🛠️ Built-in code editor with PrismJS syntax highlighting
  • ➕ Support for adding, editing, and deleting custom templates
  • 📋 One-click copy to clipboard
  • 🔄 Chinese/English interface toggle

Acknowledgments

First and foremost, I must thank 0x3f, whose problem-solving guides and algorithm templates shared in the LeetCode discussion forum inspired this project. All templates in this extension are based on his contributions. I also received his permission via Bilibili DM, and I'm deeply grateful.

Additionally, 0x3f consistently livestreams on Bilibili explaining solutions to weekly contests. I've learned a lot from his videos. If you find this project useful, please consider following him on Bilibili: @灵茶山艾府.

Second, I want to thank Gemini AI Studio. Most of the code in this project was written with Gemini's assistance, which greatly accelerated the development and realization of my ideas.