Cloudera interview question

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