MixerBox interview question

The first question is about strings The second question is about dynamic programming