Apple interview question

Code round , Java, Arrays, string