Goldman Sachs Interview Question

2 programming questions related to String and map