Problem or limitation
SlidingWindowVisualizer.jsx only supports executable code examples in JavaScript and Python.
- Java support is missing despite AlgoScope advertising Java, C++, Python, and JavaScript support.
- Learners using Java have no code reference for the sliding window visualizer.
- Missing Java implementation affects:
- Max Sum of Size K
- Longest Unique Substring
- Smallest Subarray ≥ Target
Proposed solution
Add a java entry to the code object for all six approach configs (3 problems × brute force + sliding window), following the existing js/py pattern of { src: [...], map: {...} }. Specifically:
- Add Java source line arrays with correct
map line-number references for step-highlighting (each language has its own map since line counts differ)
- Extend the
tokenize() syntax highlighter with a Java-aware regex (keywords like public, static, void, int, class, new, Integer.MAX_VALUE, HashSet, etc.)
- Add
'java' to the language toggle button list (currently ['js', 'py'])
- Update the code panel filename label to show
.java when Java is selected
Alternatives considered
N/A
Use case
Students working through algorithm patterns in a Java-based course or interview prep track (many DSA courses and interviews are Java-first) can follow the same step-by-step animation and see the equivalent Java code highlighted in sync, instead of having to mentally translate from the JS or Python shown.
Additional context
N/A
Problem or limitation
SlidingWindowVisualizer.jsxonly supports executable code examples in JavaScript and Python.Proposed solution
Add a
javaentry to thecodeobject for all six approach configs (3 problems × brute force + sliding window), following the existingjs/pypattern of{ src: [...], map: {...} }. Specifically:mapline-number references for step-highlighting (each language has its own map since line counts differ)tokenize()syntax highlighter with a Java-aware regex (keywords likepublic,static,void,int,class,new,Integer.MAX_VALUE,HashSet, etc.)'java'to the language toggle button list (currently['js', 'py']).javawhen Java is selectedAlternatives considered
N/A
Use case
Students working through algorithm patterns in a Java-based course or interview prep track (many DSA courses and interviews are Java-first) can follow the same step-by-step animation and see the equivalent Java code highlighted in sync, instead of having to mentally translate from the JS or Python shown.
Additional context
N/A