Okta Interview Question

It was a question that resembles leetcode question.