Pergunta de entrevista da empresa Splunk

Average difficulty leetcode question involving arrays.