Splunk interview question

Average difficulty leetcode question involving arrays.