Expedia Group interview question

2 medium-difficult coding questions