Visa Inc. interview question

Array, String, Stack and DP