American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro to Competitive Programming – Darin

July 29 @ 7:00 pm - 8:00 pm

What We Did Today:

  1. Reviewed dynamic programming
  2. Went through a couple problems include number of steps (DP/Recursion) and the Mad Scientist problem (greedy)

Homework:

Go through this problem (we will discuss this in class next week):

/**
 * Problem Statement:
 * You are given a list of coin denominations and a target amount.
 *
 * Your task: Count how many different ways you can make up that amount using unlimited coins from the list.
 *
 * You may use each coin as many times as you want.
 *
 *  Input:
 * An integer amount (amount ≥ 0)
 *
 * An array coins[] of positive integers
 *
 *  Output:
 * An integer representing the number of distinct combinations to make up the amount
 *
 *  Examples:
 * Example 1:
 * plaintext
 * Copy
 * Edit
 * coins = [1, 2, 5]
 * amount = 5
 * ✅ Output: 4
 *
 * ✅ Explanation:
 *
 * [1+1+1+1+1]
 *
 * [1+1+1+2]
 *
 * [1+2+2]
 *
 * [5]
 *
 * Example 2:
 * plaintext
 * Copy
 * Edit
 * coins = [2]
 * amount = 3
 * ✅ Output: 0 (you can’t make 3 using only 2s)
 */

Notes:

You can reach out to me at ddjapri@ayclogic.com if you have any questions!

You can find class notes here.

Details

Date:
July 29
Time:
7:00 pm - 8:00 pm
Event Categories:
,