Netskope Phone Screening
Anonymous User
1241

Think of public holidays - like New Years, Labor day etc. Public holidays and holiday days vary among states in a country and among different countries.

Our goal is to develop a travel schedule for the next 6 months with the sole purpose of enjoying the most number of holiday days, within budget. One gets to enjoy a holiday day as long as they're physically in the country where that day is a holiday.

The interviewer himself was not clear about the question, input format and the output format!! Terrible experience

Let's start with 2 locations where the home location is Seattle, US & the second location is Vancouver, Canada.

Input:
PublicHolidays =

{
  "United States" : [
    {
      "Seattle": {"New Year" : [1], "MLK" : [17]
    },
	{
      "New York": {"New Year" : [1], "MLK" : [17]
    }
      ],
	  "Canada" : [
	  {
		"Vancouver": {"New Year" : [1], "Family day" : [23], "Long Weekend": [68, 69, 70, 71]}
	  } ] 
}

Output:
UnitedStates -> Seattle : Jan 1, ML: 17
Canada->Vancouver -> Jan 23

Comments (0)