Quick Overview

Find the cheapest outbound and return fares subject to a minimum stay between the travel days. Use suffix minima to evaluate every valid departure in linear time, and discuss deterministic date selection and lower-space variants.

Find the Cheapest Valid Round Trip

Company: Uber

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Find the cheapest outbound and return fares subject to a minimum stay between the travel days. Use suffix minima to evaluate every valid departure in linear time, and discuss deterministic date selection and lower-space variants.

Read the full Uber Software Engineer interview experience this question came from

Loading…