This question evaluates a candidate's competence in algorithm design and optimization, including interval-based cost aggregation and modular arithmetic for large-number results within the Coding & Algorithms domain.
You have n images. For the i-th image, processing costs filterCost[i] per day and must run from startDay[i] to endDay[i] inclusive. Each day you may optionally apply a discount once: if used, processing all images that day costs discountPrice instead of the sum of their individual costs. Compute the minimum total cost to finish all images, modulo 1 000 000 007.