Kinetic Automation interview question

Leetcode coding test was the second round