Leetcode 0322. Coin Change

Posted on Thu 05 September 2024 in Leetcode • Tagged with knapsack-unbounded, dp-2d

Question Link : https://leetcode.com/problems/coin-change/

Difficulty: Medium

Premium: False

Question

You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money. Return the fewest number of coins that you need to make up that amount. If that …


Continue reading

Leetcode 0983. Minimum Cost For Tickets

Posted on Mon 27 March 2023 in Leetcode • Tagged with dp, knapsack-unbounded

Question Link : https://leetcode.com/problems/minimum-cost-for-tickets/

Difficulty: Medium

Premium: False

Question

You have planned some train traveling one year in advance. The days of the year in which you will travel are given as an integer array days. Each day is an integer from 1 to 365. Train tickets …


Continue reading