Java: Coin Change

Level : Beginner
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 00:15:00

Lab Details

Problem Statement:

Given an integer array of coins[ ] of size N representing different types of currency and an

integer sum, The task is to find the number of ways to make sum by using different

combinations from coins[].

Note: Assume that you have an infinite supply of each type of coin.

Input:

sum = 4, coins[] = {1,2,3},

Output:

4
there are four solutions: {1, 1, 1, 1}, {1, 1, 2}, {2, 2}, {1, 3}.
Self-paced Membership
  • 22+ Courses
  • 750+ Hands-On Labs
  • 200+ Quick Notes
  • 55+ Skill Tests
  • 45+ Interview Q&A
  • 10+ Real-world Projects
  • Career Coaching
  • Email Support
Upto 66% OFF
KNOW MORE..

To get full access to all courses

Still have some questions? Let's discuss.
CONTACT US
Accept cookies & close this