Expedia OA 2025 | Best Time to Buy Flight Tickets & Clean Hotel Review Keywords
Question · Posted Jun 2026
Problem 1 - Best Time to Buy Flight Tickets Problem Statement You are analyzing a historical price feed for a flight route represented by an integer array prices. The value prices[i] denotes the ticket price on day i. You may perform exactly one transaction: Buy a ticket on one day. Sell the ticket (or receive a refund credit) on a future day. Return the maximum profit obtainable from a single transaction. If no profitable transaction exists, return 0. Constraints Constraint ...
The full answer & interview discussion are available to premium members.
Log in Create a free account