~ Algorithms ~

Super quick Find & Replace

Super quick Find & Replace

This article explores a number of ways of performing a find/replace and compares the various implementations for different sizes of the find/replace list and input text.

Set data structures & Implementation

Set data structures & Implementation

Sets are an important concept and extremely useful in various computer science applications. We take a look at some of the ways a set data structure can be implemented.

Binary heaps & Priority Queues

Binary heaps & Priority Queues

Heaps and Queues can be a powerful data structure. This article goes into the implementation of a binary heap and extends the data structure to act as a priority queue.

Recursive functions, Stack overflows and Python

Recursive functions, Stack overflows and Python

Here we look at recursive functions in Python, and explore some ways of avoiding the maximum stack depth limit by using alternate functions like reduce().

Facebook puzzle - Find Sophie

Facebook puzzle - Find Sophie

Today we solve the FB engineering puzzle - Find Sophie. We start with a naive solution and improve the algorithm until we can pass the Facebook Puzzlebot. In closing, I leave you with open-ended questions on improving the algorithm further.