Skip to content

Instantly share code, notes, and snippets.

@ruminations
ruminations / timsort.py
Last active August 13, 2021 21:05
An educational version of the timsort algorithm written in python.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module : timsort.py
Website: https://gist.github.com/ruminations/89a045dc0ef7edfb92304a0de0752ee0
License: https://github.com/ruminations/Licenses#design-license
Initial Copyright September 2018
This is a python implementation of the ideas presented by Tim Peters at: