two arrays interesting problem on hackerrank