Showing 3 of 8 questions
Imagine you're managing a shop and need to decide when to close to minimize penalties. Determine the optimal closing time based on customer arrival data to reduce losses.
#1. Minimum Penalty for a Shop
You are given equations represented by pairs of variables and their corresponding values. Your task is to evaluate queries based on these equations, determining the value of expressions if possible, or returning -1.0 if not.
#2. Evaluate Division
Find the cheapest price to fly from a source to a destination with at most K stops. You're given a list of flights with prices and need to determine the optimal route within the stop limit.
#3. Cheapest Flights Within K Stops