RetailOn interview question

2 basic programming questions - Array and string based