Wildcard Matching

Solution: DFS with memorization This is a similar problem to Regular Expression Matching. However, the test data on leetcode OJ here is much stronger. The length of string can be over 1000. For problem, Regular Expression Matching, I wrote a...

Survival Analysis Material

Tutorial Survival and censored data: http://infoscience.epfl.ch/record/112202/files/lafteris.pdf

Palindrome Partitioning II

Description Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s. For example, given s = “aab”, Return 1 since the palindrome partitioning...

Maximal Rectangle

Description Given a 2D binary matrix filled with 0’s and 1’s, find the largest rectangle containing all ones and return its area. Analysis This is an interesting problem. It is hard to come up with the best solution if you...

Largest Rectangle in Histogram

Description https://oj.leetcode.com/problems/largest-rectangle-in-histogram/ Analysis & Solution This is a pretty interesting question. The best solution using stack looks very tricky at the first look. This post will give some analysis of what is the thought under that solution and a more...