Apple Interview Question

Code round , Java, Arrays, string