Dynamic Programming : Number of ways to.….When it comes to solving questions asking for the number of ways to be king of the world, or something simpler — the number of ways to…Dec 28, 2020Dec 28, 2020
Dynamic Programming and the partition problemThe first thing to note about Dynamic Programming is that — you cannot memorize the patterns! Memoize, but do not memorize!Dec 21, 2020Dec 21, 2020
Jeff Erickson’s book on algorithmsI’d started to get bored of leetcode. I could not bring myself to solve another leetcode problem. After all, it did not serve any higher…Dec 16, 2020Dec 16, 2020
Skip Lists — let’s make it simple!What are skip lists? The idea is actually quite intuitive. Let’s look at a real life example : You are travelling from Algoland (an…Dec 4, 2020Dec 4, 2020
Leetcode #1167 Minimum cost to connect sticksIf you notice the problem closely — what you need is a sorted list of the array everytime. What better data structure to use than a heap?Nov 10, 2020Nov 10, 2020
Leetcode #763 Partition LabelsA string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter…Nov 10, 20201Nov 10, 20201
Edit distance variant — shortest common super-sequenceThe motivation for this problem came from Steven Skiena :May 11, 2020May 11, 2020
Edit distance variant — Longest common subsequenceThe longest common subsequence is a very popular DP problem whereby we try to figure out the longest common subsequence between two stringsMay 11, 2020May 11, 2020
Edit distance variant — longest common substringWe take a look at a variant of the Longest common subsequence problem — which is the longest common substring problem.May 11, 2020May 11, 2020
Edit distance variant — interleaving stringsWe take a look at another variant of the edit distance problem — Interleaving strings.May 11, 2020May 11, 2020