What is error inmy code of unique no 3 question
for 8 5 1 2 1 2 35 7 tc it is giving 0 4 o/p why
hello @kailash_01
i would like to help you, could you please elaborate your doubt .
you have doubt in unique number 3 or unique number 2 ?
the code you have shared is for unique number 2 .
unique no 2 on which question i have popsted the doubt it is giving 0 4 ans for tc --> 5 1 2 1 2 35 7 tc
hello @kailash_01 this is the correct code https://ide.codingblocks.com/s/340448
go through it because of some shortcut tricks you have committed mistakes.
if you feel your doubt is cleared please mark this as resolved .
Happy Learning !!
okk This code is correct and accepting all tc then why for n= 8 5 1 2 1 2 3 5 7
it is giving o/p 0 4 for n=8 5 1 2 1 2 3 5 7 but it should be 3 7
no it is giving the correct output when i am running the code .
in your code before i have made changes it was giving this output because of some of your shortcut tricks .
if you see the corrected code and if you dry run for it you will be able to find your errors.
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.