what is difference between the following two loops,which to use when (different places interchangebly use in coin change problem)
- for(int i=0;i<n;i++)
{
for(int j=1;j<=target;j++)
{
}
}
- for(int i=1;i<=target;i++)
{
for(int j=0;j<n;j++)
{
}
}
where n is number of elements in array