Fading Coder

One Final Commit for the Last Sprint

Dynamic Programming for Unbounded Knapsack Problems: Coin Change, Combination Sum, and Stair Climbing

Unbounded Knapsack Fundamentals In the unbounded knapsack problem, each item can be used an unlimited number of times, unlike the 0/1 knapsack where each item is used at most once. This difference requires two key implementation changes: When iterating through the knapsack capacity, we must iterate...

Algorithmic Solutions for Selected Problems from the 12th Blue Bridge Cup

B. Determining the Number of Unique Lines in a Grid Given a grid of points defined by coordinates (x, y) where x ranges from 0 to 19 and y ranges from 0 too 20, the objective is to calculate the total number of distinct straight lines that can be formed by connecting any two points. Implementation S...