hackerrank: two arrays