first time I solved first four second was good problem
@pranjalbansal84594 жыл бұрын
bhai iski complexity smjh nhi aa rhi bs, mtlb 100 cases pr string check ho rhi h and string ki length 2*10^5 h to TLE aa jana chahiye naa.
@nutanhotwani89674 жыл бұрын
Hello! I have been following your videos for a long time and I wanted the solution for one question. If you could please help me with it? The question is: find total number of ways of selecting K non-adjacent cells in a matrix. I would be waiting for your video:) Or any link to the solution would also help
@HiteshTripathi4 жыл бұрын
Question link please.
@nutanhotwani89674 жыл бұрын
@@HiteshTripathi This question was asked in CodeArena.. I do not have the link
@priyanshurajtrading4 жыл бұрын
Bhai code ki link bhi daal diya karo description me samjhne me help hoti hai
@darshanjha40864 жыл бұрын
was waiting for this....please upload B
@naafizrahman65384 жыл бұрын
I have taken all the pair of numbers from 0-9 possible and tried to find the pair with maximum frequency, still I get WA.
@HiteshTripathi4 жыл бұрын
Sequence also matters. abababababa......in this way.... But in your case sequence check nahi hoga
@ashutoshdixit28064 жыл бұрын
#include #include #include #include #include #include using namespace std; int min(int a, int b) { if (a < b) return a; else { return b; } } int main() { int t; cin >> t; while (t--) { string str; cin >> str; int h[10]; memset(h, 0, sizeof(h)); for (int i = 0; i < str.length(); i++) { h[str[i] - '0']++; } // cout
@RakeshGupta-ft6cc4 жыл бұрын
Nope, I think Hitesh is wrong. It is possible. I used the same method. I stored all the indices of 0-9 in separate arrays. Then for each pair, I took the corresponding two arrays and started checking the sequence frequency using the indices stored in them
@HiteshTripathi4 жыл бұрын
@@RakeshGupta-ft6cc bro he is saying different thing and you are saying different thing.
@RakeshGupta-ft6cc4 жыл бұрын
@@HiteshTripathi oh ok.
@girishgarg28164 жыл бұрын
Bro ur image is blocking the view. Webcam view nhi bhi rakhoge toh chalega
@HiteshTripathi4 жыл бұрын
Ok bhai.
@fearlesscoder20544 жыл бұрын
Bhaiya kal mai maths waale question mai hi phas gya but jab maine uska solution dekha to pta chala kitna easy tha wo,Bhaiya maths questions ke liye kya karu?,mai seive method se prime nikalne laga tha but solution mai kuch laga hi nhi aisa
@lmlstudio20083 жыл бұрын
thanks, helped me a lot
@mdshahariarsadiq99953 жыл бұрын
thanks
@palashkamble23254 жыл бұрын
Superb explanation bro.
@aayush88414 жыл бұрын
Great Explanation Bro !!!
@SumitSingh-zw5on4 жыл бұрын
Please post the solution for problem b array walk also.
@ramyadav-jk1mm4 жыл бұрын
i first left rotated and right rotated the string and compared them.. if they are equal i print 0 else i take the frequency of each number in the input string and store them in a map.Then i take the highest frequency and return size of string - highest frequency.If the frequency of all the numbers in the input string is 1 i return size of string - 2 Please tell me where am I going wrong.
@rishabladha68314 жыл бұрын
why you are considering the case that frequency of all the numbers in string is 1 , it may or may not !! but this case not going to help us much!!!!
@girishgarg28164 жыл бұрын
if (i == j) continue; Why didn't you add this line inside our loop while counting pairs ?
@HiteshTripathi4 жыл бұрын
Sorry bro.
@girishgarg28164 жыл бұрын
But I saw your code that u submitted. You didn't write it there too but it was Accepted
@HiteshTripathi4 жыл бұрын
@@girishgarg2816 isko naa likhne se koi galti thodi na hai....bas extra values check kar raha hai.
@bhoumikparmar83484 жыл бұрын
Bro Maine same logic lagaya python me par Mera tle de raha
@ankushchhabra60924 жыл бұрын
nice explanation
@nikhilkumar-ot9rn4 жыл бұрын
bhai question ka link v de diya krr na ..or apne solution ka bhi...
@jethalalnhk24094 жыл бұрын
Good video hitesh sir
@prakhartiwari38314 жыл бұрын
Bro please upload solution of problem B..
@namangirdhar87364 жыл бұрын
I could solve only A for past two contests😬.
@HiteshTripathi4 жыл бұрын
Same bhai....😂😂 Approach aajati hai but choti mistake se rehra😅😅
@pranjalbansal84594 жыл бұрын
Bhai mere smjh me aa jata h ese ese hoga bt krna nhi aa pata😂😂
@HiteshTripathi4 жыл бұрын
Hoga bhai hoga 😂😂
@ninadchaudhari4334 жыл бұрын
Bhai aapko first wale ka logic samjha kya iam new to coding emre slution ko toh TLE aari thhi
@rishabladha68314 жыл бұрын
logic : just check if l*2
@ninadchaudhari4334 жыл бұрын
@@rishabladha6831 THANKSS!!!
@hacksark97484 жыл бұрын
Bhai kal bala contest fir vi acha tha
@akhilkhubchandani26324 жыл бұрын
Iski koi dp approach bhi hai?
@HiteshTripathi4 жыл бұрын
Iska to koi ni hai bhai shyd ....meri samjh me😅😅
@akhilkhubchandani26324 жыл бұрын
Acha thanks
@akhilkhubchandani26324 жыл бұрын
Aapka codeforces handle kya hai?
@HiteshTripathi4 жыл бұрын
Channel Bio
@mukulverma84044 жыл бұрын
Bro can u share the code?
@HiteshTripathi4 жыл бұрын
ideone.com/HTfESf
@mukulverma84044 жыл бұрын
@@HiteshTripathi thanks 👍
@jeesujain14764 жыл бұрын
Broo can u give solution of B
@HiteshTripathi4 жыл бұрын
Hua ni bro.....I'll try to upload.
@RakeshGupta-ft6cc4 жыл бұрын
@@HiteshTripathi Initially, find the total sum of k elements (0 to k). that will be the initial value. Then for each i=1 to z, the max right you can go will be decreased i.e it will be 0 to k-(2*i). In this range, you need to find two adjacent elements with max possible sum. There you will use all the z operations continuously. Since z operations are designed in a particular way, this will not create any problem. codeforces.com/contest/1389/submission/88324964