Skip to content

feat(stacks-queues): expand from 1 to 28 algorithms - #32

Merged
reshinto merged 1 commit into
mainfrom
feat/stacks-queues-expand-algorithms
Apr 5, 2026
Merged

feat(stacks-queues): expand from 1 to 28 algorithms#32
reshinto merged 1 commit into
mainfrom
feat/stacks-queues-expand-algorithms

Conversation

@reshinto

@reshinto reshinto commented Apr 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • 27 new algorithms across 8 technique subcategories: validation (2), monotonic-stack (3), expression-evaluation (3), stack-design (4), stack-applications (3), queue-operations (4), queue-design (4), queue-applications (4)
  • 3 new tracker variants: NumericStackTracker, ExpressionTracker, QueueTracker — each extends BaseTracker and produces StackQueueVisualState
  • Extended StackQueueVisualState with optional fields for numeric arrays, queues, auxiliary stacks, output tokens, result arrays, circular buffers, monotonic ordering, and phase labels
  • Extended StackQueueVisualizer with conditional rendering for all new visual state sections (queue row, auxiliary stack column, output/result rows, circular buffer ring, badges)
  • Updated InputEditor to use GenericIntrospectEditor for stacks-queues (diverse input shapes)
  • Fixed GenericIntrospectEditor to handle deeply-nested non-numeric arrays without crashing
  • Optimized E2E specs: merged redundant per-algorithm tests (2-3 → 1 each), reducing total E2E test count from ~648 to ~365
  • Updated CI: E2E shards 12 → 14, local Playwright workers 50% → 75%
  • 27 new fn-import.d.ts entries with zero duplicates

Algorithms added

Technique Algorithms
validation min-remove-to-make-valid, longest-valid-parentheses
monotonic-stack online-stock-span, remove-k-digits, sum-of-subarray-minimums
expression-evaluation evaluate-reverse-polish, basic-calculator, infix-to-postfix
stack-design min-stack, asteroid-collision, decode-string, max-frequency-stack
stack-applications simplify-path, backspace-string-compare, remove-all-adjacent-duplicates
queue-operations sliding-window-maximum, implement-queue-using-stacks, implement-stack-using-queues, number-of-recent-calls
queue-design design-circular-queue, design-circular-deque, task-scheduler, moving-average-from-stream
queue-applications generate-binary-numbers, interleave-first-half-queue, first-non-repeating-char-stream, flatten-nested-list-iterator

Test plan

  • npm run lint passes
  • npm run format passes
  • npm run typecheck passes
  • npm test — 6312 tests pass (676 files)
  • npm run storybook:build passes
  • E2E stacks-queues — 56 tests pass (28 algorithms × 2 assertions each)
  • Full E2E suite — verify no regressions in other categories
  • CI pipeline passes all shards

…r variants

Add 27 new algorithms across 8 techniques: validation (2), monotonic-stack (3),
expression-evaluation (3), stack-design (4), stack-applications (3),
queue-operations (4), queue-design (4), queue-applications (4).

New trackers: NumericStackTracker, ExpressionTracker, QueueTracker.
Extended StackQueueVisualState with optional fields for numeric arrays, queues,
auxiliary stacks, output tokens, result arrays, circular buffers.
Extended StackQueueVisualizer with conditional rendering for all new visual states.
Updated InputEditor to use GenericIntrospectEditor for diverse input shapes.
Optimized E2E specs by merging redundant per-algorithm tests into single tests.
Increased E2E CI shards from 12 to 14 and local workers from 50% to 75%.
@reshinto
reshinto merged commit dc2415e into main Apr 5, 2026
30 checks passed
@reshinto
reshinto deleted the feat/stacks-queues-expand-algorithms branch April 5, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant