CGI interview question

LeetCode algorithm question solved using JavaScript.