An Interesting Exercise in Dynamic Programming

Given an array of building heights (with unit width), calculate the area of the largest rectangle that “fits” within these buildings. For…

0-1 Knapsack Problem in Python

The 0-1 Knapsack problem is a variation on the knapsack problem with one condition: there is only one copy of each item. You may choose to…

Iterative Tree Traversals in Python

Tree traversals are most naturally expressed in recursion, but iterative versions are cool too, plus they take only O(1) space. Inorder…

Jekyll Variable in SCSS Files

You can use Jekyll site variables in top-level SCSS files. For example: These site variables will also visible in partials that are imported…

Custom Liquid Tags

Coming back to Jekyll from Hugo, I’d grown accustomed to shortcodes, which are awesome to keep your Markdown source as HTML-free as possible…

Data Structures in TypeScript

Took some time off this weekend to learn some TypeScript, and reimplemented some data structures as practice. I don’t think I’ll continue to…