3 test cases failing
Finding cb num - doubt
Hi @Aayush_25, pls re-read the question and attempt it again. It has nothing to do with prime numbers. There are 2 parts of this question, solve both of them with a straightforward approach, nothing complex is needed here.
Hope this helps
correct me if i’m wrong but the question indirectly defines CB numbers as prime numbers only…
secondly i assume the 2 parts you are referring to are checking for cb number and generating substrings and i considered both of them
Hi @Aayush_25 , that’s not true. Because you can see that the numbers listed over there are not all of the prime numbers, right ! And your code considers all the prime numbers as CB numbers. And yeah, the 2 parts i am referring to are that only.
OK if this helps, how about approaching / making algo for this question directly. Like, as mentioned in the question. Do directly what the question is asking.
Hope this helps
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.