algorithms

Longest Common Subsequence

...with an unconventional approach

1062 words/5 min read
This is a three way LCS solution using a ‘sparse’ data structure and an intuitive conceptual model to aid your understanding.

Mergesort Cutaway

1431 words/7 min read

Sorting an array can be done in different ways. It ranges from the simpler bubble sort to more complicated ones such as the merge sort.

Reversing a linked list: cutaway

993 words/5 min read

A linked list is a sequential data structure. A head pointer points to the first node and each node has a pointer to the next. The last node is suitably terminated. Manipulating a linked list is an exact exercise and reversing it certainly so. Would a cutaway view be helpful?

Dynamic Programming: Knapsack Problem

1335 words/7 min read

Dynamic Programming is an algorithmic technique to solve constrained, combinatorial optimization problems. The Knapsack here is a metaphor for the constraint. The ‘knapsack’ might as well be a container ship.

Comb Sort Cutaway

Bubble sort with attitude

837 words/4 min read
What is comb-sort? Comb-sort is a newer and modified form of bubble-sort. It seeks to improve the time-complexity of the traditional bubble-sort.

Bubble Sort Cutaway

Bubble sort at your pace

781 words/4 min read
What is bubble sort? Bubble sort is a relatively easy to understand and easy to implement algorithm. It was one of the earliest ones to be discovered.

Binary Search Cutaway

Watch the algorithm converge...!

739 words/4 min read
What is binary search? Binary search is an algorithm for searching elements from a sorted array. It far outweighs in benefits compared to a linear search method.