A Software Engineering Space

Fast sub string searching in amortized O(d) with Suffix Trees

There are a lot of ways to test if a string is contained within another string. Unfortunately, when it comes to searching in strings the algorithms are either incredibly complex and sensitive to implementation details (looking at you KMP) or just downright slow. In a previous article I went over a technique for accomplishing this […]

Algorithm Visualization Techniques & Data Observation

Often times when designing or learning a new algorithm it is beneficial to have a visual representation of what is “going on inside” an algorithm. As with self balancing binary search tree’s it is often helpful to know how the data is currently being organized compared to how it should be organized when trouble shooting a […]

Displaying Binary Search Trees

Have you ever wanted to display a binary search tree while conveying its structural make up? Sure, with a combination of several traversals we can dedeuce the trees structure, but there must be a faster, easier way… right? Actually, there is. And it only requires one complete in-order traversal of the tree. A Recursive Pretty […]

Langton’s Ant: Exploring State Machines through Cellular Automata

I’ve been covering some heavy topics lately with my Stack Machine & Compiler series, so I figured I would break things up with a light interlude on a topic that is both fascinating, easy to follow, and most of all fun: Cellular Automata. Cellular automatons, such as John Conways “The Game of Life”, and in […]