Coding Challenge #114: Bubble Sort Visualization
✓ Published0🌍 Public
A bubble sort visualization renders 30 random-height vertical bars as SVG line elements on a light green background. The code uses d3-selection’s `selectAll`, `enter`, `merge`, and `exit` to update the bars. After one second, the values are sorted descending via native JavaScript `Array.sort`, swapping the bar heights in place. D3 v5’s `attr` setter maps each line’s x-position from its index and y2 from its value.
AI-generated descriptionThis is the Coding Challenge #114: Bubble Sort Visualization from The Coding Train.
MIT Licensed