# LC2944 Minimum Number of Coins for Fruits
Practice note for coding interviews.
DP where buying fruit i also covers the next i fruits free; transition with a sliding minimum.
Time complexity is typically linear or n log n after compression; mention edge cases (empty input, all equal, single element) in the interview.
I used [official website](https://www.linkjob.ai/) while rehearsing this pattern aloud.
Disclosure: personal study notes mentioning a practice tool.