Implement snapshot-based sorting visualizer

Refactor sorting to produce and consume SortSnapshot sequences for visualization. SortingService now creates immutable snapshots and implements bubble, quick and heap sorts (with helper methods) instead of performing UI delays; a swap/heapify/partition flow records state changes. SortingComponent was updated to animate snapshots (with start/stop timeout handling), added array size input and controls, stores an unsorted copy for resets, and uses ChangeDetectorRef for updates. Minor UI tweaks: faster bar transitions, info color, updated default array size and animation speed, and added i18n keys for ARRAY_SIZE (en/de).
This commit is contained in:
2026-02-04 11:37:11 +01:00
parent cbc46cf858
commit 450ab0b837
7 changed files with 261 additions and 112 deletions

View File

@@ -334,7 +334,8 @@
"START": "Start Sorting",
"RESET": "Reset",
"GENERATE_NEW_ARRAY": "Generate New Array",
"EXECUTION_TIME": "Execution Time"
"EXECUTION_TIME": "Execution Time",
"ARRAY_SIZE": "Number of Bars"
}
}
}