Original: Simon Willison · 11/03/2026
Summary
Simon Willison shares his experience creating animated demonstrations of sorting algorithms using Claude Artifacts, including Python’s Timsort.Key Insights
“I’ve always been a fan of animated demonstrations of sorting algorithms.” — Introduction to the article
“Regular Claude chat can clone repos from GitHub these days.” — Discussing the capabilities of Claude
“‘do better’ is a fun prompt, and now the ‘Run all’ button produces this effect.” — Feedback on the design improvements
Topics
Full Article
11th March 2026 - Link Blog Sorting algorithms. Today in animated explanations built using Claude: I’ve always been a fan of animated demonstrations of sorting algorithms so I decided to spin some up on my phone using Claude Artifacts, then added Python’s timsort algorithm, then a feature to run them all at once. Here’s the full sequence of prompts: Interactive animated demos of the most common sorting algorithms This gave me bubble sort, selection sort, insertion sort, merge sort, quick sort, and heap sort. Add timsort, look up details in a clone of python/cpython from GitHub Let’s add Python’s Timsort! Regular Claude chat can clone repos from GitHub these days. In the transcript you can see it clone the repo and then consult Objects/listsort.txt and Objects/listobject.c. (I should note that when I asked GPT-5.4 Thinking to review Claude’s implementation it picked holes in it and said the code “is a simplified, Timsort-inspired adaptive mergesort”.) I don’t like the dark color scheme on the buttons, do better Also add a “run all” button which shows smaller animated charts for every algorithm at once in a grid and runs them all at the same time It came up with a color scheme I liked better, “do better” is a fun prompt, and now the “Run all” button produces this effect:Related Articles
Interactive explanations - Agentic Engineering Patterns - Simon Willison's Weblog
Simon Willison · explanation · 55% similar
I'm Boris and I created Claude Code. I wanted to quickly share a few tips for using…
Boris Cherny · how-to · 53% similar
GIF optimization tool using WebAssembly and Gifsicle - Agentic Engineering Patterns
Simon Willison · how-to · 53% similar
Originally published at https://simonwillison.net/2026/Mar/11/sorting-algorithms/#atom-everything.