Sort by

recency

|

744 Discussions

|

  • + 0 comments
    def getWays(n, c):
        ways = [0] * (n + 1)
        ways[0] = 1
        for coin in c:
            for i in range(coin, n + 1):
                ways[i] += ways[i - coin]
        return ways[n]
        
    
  • + 0 comments
    def getWays(n, c):
        count = [0]*(n+1)
        count[0] = 1
        c.sort(reverse = True) 
        for coin in c:
            for i in range(coin, n +1):
                count[i] += count[i-coin]
        return count[n]
    		
    

    sorting is done in order to understand how denomination is formed

  • + 0 comments

    How can i find good designer for my Website? [https://hhftraining.co.uk/

  • + 0 comments

    The Coin Change Problem involves finding the number of ways to make a given amount using a set of coins with specified denominations. It's commonly solved using dynamic programming to optimize calculations z7. Let me know if you need further clarification or code examples!

  • + 1 comment

    The Coin Change Problem involves finding the number of ways to make change for a given amount using a set of coin denominations 3rr. It’s often solved using dynamic programming for efficiency.

    • + 1 comment

      You can solve the Coin Change Problem efficiently using dynamic programming by building a table to store solutions for subproblems. This approach avoids redundant calculations and improves performance. If you're implementing this on Android, consider using optimized data structures to handle large inputs efficiently. 🚀

      • + 1 comment

        You can solve the Coin Change Problem efficiently using dynamic programming by building a table to store solutions for subproblems. This reduces redundant calculations and improves performance. If you're implementing this in an Android APK, you can use Java or Kotlin with a recursive + memoization approach for better efficiency.

        • + 1 comment

          Android Game APK is an exciting and action-packed mobile game designed for thrill-seekers and racing enthusiasts. Experience high-speed challenges, intense gameplay, and stunning graphics that will keep you engaged for hours. With a variety of cars, tracks, and customization options, you can race your way to victory and become the ultimate champion.