avatar_url

Sandesh Rana | Python

I'm a developer from Himalayas, with a passion for crafting efficient and elegant code, with creativity and precision.

Dynamic Programming

21 Aug 2024 » programming, algorithm

Dynamic Programming: Easy to Hard Problems

Easy

  1. Climbing Stairs (Finds the number of ways to climb stairs with given steps)
  2. House Robber (Determines the maximum amount of money that can be robbed without alerting the police)
  3. Best Time to Buy and Sell Stock II (Finds the maximum profit from multiple transactions)
  4. Fibonacci Number (Computes the nth Fibonacci number)
  5. Maximum Subarray (Finds the contiguous subarray with the maximum sum)

Medium

  1. Longest Common Subsequence (Finds the longest common subsequence between two strings)
  2. Edit Distance (Calculates the minimum edit distance between two strings)
  3. Coin Change (Finds the minimum number of coins required to make a given amount)
  4. Partition Equal Subset Sum (Determines if a set can be partitioned into two subsets with equal sum)
  5. 0/1 Knapsack Problem (Solves the 0/1 knapsack problem with given weights and values)

Hard

  1. Edit Distance (Calculates the minimum number of operations required to convert one string to another)
  2. Longest Increasing Subsequence (Finds the longest increasing subsequence in an array)
  3. Word Break II (Finds all possible sentences that can be formed from a given string using a dictionary)
  4. Integer Partition (Finds the number of ways to partition a number into distinct positive integers)
  5. Wildcards Matching (Determines if a string matches a pattern with wildcards)