Cloudera Interview Question

One question was dynamic programming related and the other was simple string slicing.