k-th Largest Number from a List of Digits

Given a list of digits (possibly containing duplicates) from 0-9, and a number k, find the k-th largest number that can be formed from these…

Balanced augmented interval trees

Wrote a Go implementation of an interval tree. This particular one is using the augmented style, as outlined here. It is also balanced. The…

Iromeku

I wrote a Python port of this Stack Overflow answer, which is a way of extracting a colour palette from an image. I had previously used a…

A Redis recipe for lists of recency

A nifty recipe for maintaining a list by recency. For example, a list of recently viewed page ids, maintained per user. When inserting a new…

Longest Consecutive Sequence

Given an array of integers, find the length of the longest sequence that contains consecutive integers. The array is unsorted, and may…

New Look

siawyoung.com has been rewritten once again, this time with all the fanciest things you can imagine. Gatsby, Netlify CMS, Typescript, Styled…