Page 1 of 1

Looking for similar problems...like

Posted: Mon Dec 08, 2014 10:45 pm
by bengro
Given a sequence of ones and zeros, find the number of even pairs.
E.g. 0111 = 4, 00 = 3, 0 = 1

This can be solved in linear time with DP, yet it involves some odd/even understanding.

I would like to practice this kind of problems - do you know of similar DP problems like the one stated?

Thanks!
Ben