PayPal interview question

Related to tee traversal with medium LEETcode difficulty