FCC challenge problem

Is it bad if i cant solve these freecodecamp challenges but can understand the solutions. How can i imrpove my problem solving capacity…???

Your code so far


function checkCashRegister(price, cash, cid) {
var change;
return change;
}

checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]]);

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; SM-A205YN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.127 Mobile Safari/537.36.

Challenge: Cash Register

Link to the challenge:

I suggest you go back to the algorithms sections and try to solve them again without looking at the solutions, use the Read-Search-Ask method, learn to debug, learn to make a pseudocode algorithm before coding. Do the Algorithms in the Interview Prep section, or on Code Wars.
Practice, and keep practicing until you can do the thing you want to complete. If you feel it’s hard you are doing the right thing.

Be honest with yourself, claim the certificate only once you are able to solve the projects on your own from the given starting code

Learning to read and understand code is a different skill from being able to solve problems using code (just like learning to read doesn’t mean you know how to write a novel). You need to practice the process of writing solutions without looking at code. If you’ve been going through the challenges by looking at solutions, I suggest going back to when you started doing that and pushing yourself to do them all without looking at the solutions at all. If you get really stuck, come here and ask for help and we’ll give you advice on how to find the solution instead of code that you can copy.

thank you for your guidance sir