Hackerrank Sherlock And Array Solution