Expedia Group interview question

Assign Cookies problem from Leetcode