Solved DistinctSubsequences

But looked up the solution from n00tc0d3r. Need to figure out how
exactly it works.