Juniper Networks interview question

They ask Leetcode hard question