# Timsort in JavaScript (Running in the Browser!)

**URL:** https://forum.kirupa.com/t/timsort-in-javascript-running-in-the-browser/669561
**Category:** Uncategorized
**Created:** [September 12, 2024, 4:16am UTC](https://forum.kirupa.com/t/timsort-in-javascript-running-in-the-browser/669561 "2024-09-12T04:16:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kirupa](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kirupa/32/11616_2.png) [@kirupa](https://forum.kirupa.com/u/kirupa)
#### Post date: [September 12, 2024, 4:16am UTC](https://forum.kirupa.com/t/timsort-in-javascript-running-in-the-browser/669561/1 "2024-09-12T04:16:48Z")

</div>

Hi everybody! In my latest [article](https://www.kirupa.com/sorts/timsort.htm) (and [video](https://www.youtube.com/watch?v=0Dg41UEK3Io)), I talk about Timsort and how it works to be one of the fastest sorting algorithms:

[![](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/0/2/02061f8079ab79ecc3c778ae40042ff61444f287.jpeg "Timsort: A Deep Dive Into the Fastest Sorting Algorithm 😀") ](https://www.youtube.com/watch?v=0Dg41UEK3Io)

Now, Timsort is a fairly complex sorting algorithm. Instead of rewriting it myself for the tutorial, I decided to take a popular [node version](https://github.com/mziccard/node-timsort) and turn it into a JS version that runs in the browser.

This “Timsort in the browser” version can be seen here:

> <https://github.com/kirupa/kirupa/blob/master/data_structures_algorithms/timsort.htm>

Hope you all find it helpful 🙂

Cheers,  
Kirupa
