Google Interview Question

Simple dynamic programming and array based questions.