good first issuehacktoberfest
仓库指标
- 星标
- (0 个星标)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
To add an analytical layer, the visualizer should track key performance metrics for each algorithm run. This helps users understand the "cost" of an algorithm beyond just seeing it run.
Task:
In each sorting algorithm's logic, initialize two counters: comparisons = 0 and swaps = 0.
Increment the comparisons counter every time two elements are compared.
Increment the swaps counter every time two elements are swapped.
After the sorting animation is complete, display the final counts in the sidebar.
Use st.metric to display the results in a clean, visually appealing way. For example: