https://ide.codingblocks.com/s/296473 MENE YEH QUESTION SOLVE KARA HAI LEKIN ISME EK TEST CASE NI CHAL RHA, EK BAAR CODE CHECK KARLO KYA DIKKAT HAI.
CB NUMBERS PROBLEM
hello @CODER_JATIN
a) cb number need not to be a prime number number.
b) also logical issue is also there .
try greedy approach for this problem.
bhaiya, greedy approach vegarah to abhi tk bhaiya ne padhaya ni?
greedy approach se mere matlab tha ki pehle hum saare 1 length cb number find karnege fir , 2 lengt sb number ,and then phir 3 ā¦length so on.
aisa hum isliye karegenge kyunki hame cb numbr maximize karne hai.
check implementation here->
nahi ye kaam nahi karega.
try to do it in this way->
okay and bhaiya yeh ek āSANKET AND STRINGSā wala question hai dekhna sample output same hai ekdum lekin test cases pass ni ho rhe https://ide.codingblocks.com/s/300612
DOUBT KA LINK BHEJO ā¦
Brute force logic pass nahi hoga kyunki constraint kafi jada hai.
try to think of O(n) logic.
hint->two pointers
