Leetcode 1359 Count All Valid Pickup and Delivery Options
In this Leetcode problem, we are asked to count the number of valid combinations to pickup and deliver n packages so that we always pickup a package before we deliver it.
Given
n
orders, each order consist in pickup and delivery services.Count all valid pickup/delivery possible sequences such that delivery(i) is always after of pickup(i).
Since the answer may be too large, return it modulo 10⁹ + 7.