Goldman Sachs Interview Question

Two coding questions on the Hackerrank platform involving strings and arrays.