ServiceNow interview question

leetcode easy to medium. fibonacci, 3 sum