Showing 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
You're given a string containing braced groups of comma-separated options. Expand the string to generate all possible combinations by selecting one option from each group.
#4. Brace Expansion
You are given a list of transactions between people. Determine the minimum number of transactions needed to settle all debts, such that everyone owes or is owed exactly zero.
#5. Optimal Account Balancing
Imagine a grid where some 2x2 blocks are marked. Count how many unique integers from 0 to 4 (inclusive) represent the number of marked cells within those 2x2 blocks that intersect with given coordinates.
#6. Number of Black Blocks
Determine if two strings are considered to be one edit distance apart. An edit can be an insertion, deletion, or replacement of a single character.
#7. One Edit Distance
You're given courses with prerequisites and time to complete each. Find the minimum time to finish all courses, taking dependencies and parallel study into account.
#8. Parallel Courses III