Available question text
Given an array of costs and a fixed cost x to cyclically shift all types by one, minimize the total expense to buy one of each type by choosing how many global shifts to perform and, for each position, picking the cheapest available original item after those shifts. The core challenge is balancing the per-shift global cost against cheaper shifted purchases, which reduces to evaluating up to n cyclic offsets and taking per-index minima across shifted costs plus rotation cost.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2735. Collecting Chocolates
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source