Hi guys I just started doing a few problems on Dynamic Programming and would like to get some explanation on this code that I found on geeks for geeks.

The problem is of the coin change problem and I was able to solve it using recursion but was unable to understand the Dynamic Programming method. It would help me a lot if anyone is able to explain to me how this code works.

#include<iostream>

using namespace std;

int count( int S[], int m, int n )

{

int i, j, x, y;