Shipsy Interview Question

Basic Array and string problems