Ugly numbers problem

LINK TO MY CODE . THE CODE SHOWS WRONG ANS FOR TEST CASE BUT PASSES THE SAMPLE TEST CASE . PLEASE HELP ME OUT.

@ChiragJindal7 you have to find nth ugly number and n can be upto 10000, but the total size of your array is also 10000, so you wont be finding all the ugly numbers. Change the size of your array accordingly

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

@ChiragJindal7 As you have opened the doubt again. Can you please tell me how can I help you. And also here is the pseudocode to find the nth ugly number.