After 26 and 52 transformation ek sequence sa bnn rha hai maine woh logic implement kiya hai pr 813/824 cases run ho rhe hai uske baad tle aa rha hai Maine 52 transformation pe har ek character ka map bna liya hai aur same 26 ke bhi Phir har ek unique character in string s ke kiye after t transformation kitne character honge calculate kr rha hoon and uski frequency se multiply krke total answer mein add krta jaa rha hoon Yahi logic implement Kiya hai
used dp + memoization as you told still gives TLE after 574 test cases unordered_map mp; long long mod = 1e9 +7; long long dp(char a , int t ){ // base case if( t ==0) return 1; if (mp[a].count(t)) return mp[a][t]; if( a == 'z'){ return mp[a][t] = (dp('a' , t-1 ) + dp('b' , t-1 )) % mod; } else{ return mp[a][t] = dp(a+1 , t-1) % mod; } }
Ranked 1 in Biweekly 🚀
@arnab_17 ??? Its showing"The user does not exist " now , why??
@@burlaharshith1125 Because I changed my userid arnab_01dev that's why it is showing...
@@burlaharshith1125 It's because I changed my username to arnab_01dev .... that's why showing user does not exist .
😂he got banned because of copying and cheating@@burlaharshith1125
@@burlaharshith1125 chatgpt ka kamal
After 26 and 52 transformation ek sequence sa bnn rha hai maine woh logic implement kiya hai pr 813/824 cases run ho rhe hai uske baad tle aa rha hai
Maine 52 transformation pe har ek character ka map bna liya hai aur same 26 ke bhi
Phir har ek unique character in string s ke kiye after t transformation kitne character honge calculate kr rha hoon and uski frequency se multiply krke total answer mein add krta jaa rha hoon
Yahi logic implement Kiya hai
any good resources for tree
CSES Set
can anyone provide the code of bi weekly contest 2nd question, implemented by vivek's method
Sent on telegram!
weekly contest 421's third won't work as it will result in TLE in python
u have to use cache_clear
used dp + memoization as you told still gives TLE after 574 test cases
unordered_map mp;
long long mod = 1e9 +7;
long long dp(char a , int t ){
// base case
if( t ==0) return 1;
if (mp[a].count(t)) return mp[a][t];
if( a == 'z'){
return mp[a][t] = (dp('a' , t-1 ) + dp('b' , t-1 )) % mod;
}
else{
return mp[a][t] = dp(a+1 , t-1) % mod;
}
}
int lengthAfterTransformations(string s, int t) {
long long count =0;
for(int i =0; i
See telegram for code.
bhai koi biweeeky 4th wale ka code dedo
Sent on telegram!
Bhiya regularly code kar raha hu but fir vhi logic me problem ho raha he 😢
Everyone goes through this phase. Logic building takes time.
@@shubhamshakyawal teen sall se dsa pda rha hu still unable to develop logic😂😂.
Abhi practice kro ek question 10 times read n think then implement.
1:40:00 LeetCode problem setter be like - yes sir.
python sucks