Okta Interview Question

They gave me a LeetCode Medium question