The competitive programmer's toolkit for Java in VS Code
Stop rewriting the same algorithms. Start solving problems.
Install · Features · Algorithm Library · Keybindings · Contributing
🧠 What is JavaSTL?
JavaSTL brings STL-style algorithm templates directly into your Java workflow inside VS Code.
Whether you're grinding LeetCode, competing on Codeforces, or prepping for ICPC — JavaSTL lets you insert production-ready, optimized algorithm snippets in seconds through a clean two-level picker menu. Every template shows its time and space complexity right in the picker so you always know what you're inserting.
No more Googling segment trees at 2AM. No more copy-pasting from old submissions. Just press a shortcut and get back to thinking.
✨ Features
⚡ Insert Algorithm — Two-Level Category Picker
Browse 27 algorithms organized by category. Pick a category, pick an algorithm, and the code lands exactly where your cursor is — with a green glow highlight so you know what was just inserted.

🔎 Search All Algorithms Instantly
Don't remember which category Dijkstra lives in? Just hit Search All and type dij — fuzzy search finds it across all 27 templates in milliseconds. Each result shows the category and complexity hint.

🏁 Contest Template Generator
One command. One keystroke. A fully configured Main.java with fast I/O — BufferedReader, StringTokenizer, PrintWriter, and a solve() stub — the exact boilerplate that top competitive programmers use to avoid TLE on I/O-heavy problems.

🎨 Smart Snippet Highlighting
Every inserted snippet glows green and clears the moment you start typing — so you always know exactly what JavaSTL just inserted versus what you wrote.
🛡️ Language Guard
JavaSTL only activates inside .java files. No accidental insertions in Python or JS files.
📚 Algorithm Library
| Category | Algorithms | Count |
|---|---|---|
| 🔍 Binary Search | Lower Bound, Upper Bound, First True, Last True, Binary Search on Answer | 5 |
| 🌲 Trees | Segment Tree, Lazy Segment Tree, Fenwick Tree (BIT), Sparse Table, LCA (Binary Lifting) | 5 |
| 🕸️ Graphs | BFS, DFS, Dijkstra, Floyd Warshall, Kruskal (MST), DSU, Topological Sort | 7 |
| 📊 DP | 0-1 Knapsack, LIS, LCS, Digit DP, Bitmask DP | 5 |
| 🔤 Strings | KMP, Z Algorithm, Rabin-Karp, Trie, Rolling Hash | 5 |
27 algorithms — all with time & space complexity hints, inline comments, and usage notes.
⌨️ Keybindings
| Shortcut | Action | Context |
|---|---|---|
Ctrl+Alt+J / Cmd+Alt+J |
Insert Algorithm | Inside a .java file |
Ctrl+Alt+N / Cmd+Alt+N |
New Contest File | Anywhere |
Ctrl+Shift+P → JavaSTL |
All commands | Anywhere |
Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
- Split the editor (
Cmd+\on macOS orCtrl+\on Windows and Linux). - Toggle preview (
Shift+Cmd+Von macOS orShift+Ctrl+Von Windows and Linux). - Press
Ctrl+Space(Windows, Linux, macOS) to see a list of Markdown snippets.
For more information
Enjoy!