Search⌘ K
AI Features

Solution: Minimum Cost For Tickets

C# solution for the Minimum Cost For Tickets problem using the Dynamic Programming pattern.

Statement

You are given a list days, where days[i] represents a calendar day on which you plan to travel. You are also given travel pass costs for three different durations:

  • A 11-day pass costs costs[0].

  • A 77-day pass costs costs[1].

  • A 30 ...