- Видео 134
- Просмотров 11 605
CoWo (Code World)
Индия
Добавлен 9 мар 2022
Welcome to CoWo! 🎉
Join us at CoWo, where we make learning data structures and algorithms fun and easy. Perfect for anyone looking to improve their coding skills and prepare for tech interviews.
What You’ll Find Here:
📚 Easy Tutorials: Simple explanations of complex coding topics.
🧩 Problem-Solving: Step-by-step guides to solving tricky problems.
🎯 Interview Tips: Advice and tips to help you ace tech interviews.
About Me:
Hi, I'm Riya Das. I love coding and helping others learn. With my experience, I'll guide you through learning data structures and algorithms, making it easy and fun.
Subscribe Now and hit the bell icon 🔔 so you never miss a video from CoWo!
Happy Coding! 🚀
Join us at CoWo, where we make learning data structures and algorithms fun and easy. Perfect for anyone looking to improve their coding skills and prepare for tech interviews.
What You’ll Find Here:
📚 Easy Tutorials: Simple explanations of complex coding topics.
🧩 Problem-Solving: Step-by-step guides to solving tricky problems.
🎯 Interview Tips: Advice and tips to help you ace tech interviews.
About Me:
Hi, I'm Riya Das. I love coding and helping others learn. With my experience, I'll guide you through learning data structures and algorithms, making it easy and fun.
Subscribe Now and hit the bell icon 🔔 so you never miss a video from CoWo!
Happy Coding! 🚀
ConstructXor | CodeChef STARTERS 129 | Explanation + Code
Please subscribe if you find it helpful.
Question Link: www.codechef.com/problems/XRSM?tab=statement
Question Link: www.codechef.com/problems/XRSM?tab=statement
Просмотров: 72
Видео
Palindromic Substrings | CodeChef STARTERS 129 | Explanation + Code
Просмотров 686 месяцев назад
Please subscribe if you find it helpful. Question Link: www.codechef.com/problems/GPL
Ballon d Or | CodeChef STARTERS 129 | Explanation + Code
Просмотров 306 месяцев назад
Please subscribe if you find it helpful. Question Link: www.codechef.com/problems/BLNDOR
Minimize Manhattan Distances | LeetCode Weekly Contest 391 | Explanation in Hindi + Code
Просмотров 596 месяцев назад
Please Like and Subscribe if you find it useful.
Anti-Triangle | CodeChef STARTERS 127 | Explanation + Code
Просмотров 837 месяцев назад
Please subscribe if you find it helpful. Question Link: www.codechef.com/problems/ANTITRI
Superincreasing | CodeChef STARTERS 127 | Explanation + Code
Просмотров 767 месяцев назад
Please subscribe if you find it helpful. Question Link: www.codechef.com/problems/SUPINC
E. Girl Permutation | Codeforces Round 936 (Div. 2)| | Explanation in Hindi
Просмотров 607 месяцев назад
Please subscribe if you find it helpful.
Prime Multiples | Mathematics | CSES Sheet | Explanation in Hindi + Code
Просмотров 947 месяцев назад
Please subscribe if you find it helpful.
Longest Common Suffix Queries | LeetCode Weekly Contest 390 | Explanation in Hindi + Code
Просмотров 147 месяцев назад
Please Like and Subscribe if you find it useful.
Most Frequent IDs | LeetCode Weekly Contest 390 | Explanation in Hindi + Code
Просмотров 77 месяцев назад
Please Like and Subscribe if you find it useful.
Minimum moves to pick K Ones | LeetCode Weekly Contest 389 | Explanation in Hindi + Code
Просмотров 1697 месяцев назад
Please Like and Subscribe if you find it useful.
F. Rudolf and Imbalance | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Просмотров 1627 месяцев назад
Please subscribe if you find it helpful.
E. Rudolf and k Bridges | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Просмотров 3527 месяцев назад
Please subscribe if you find it helpful.
D. Rudolf and the Ball Game | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Просмотров 1077 месяцев назад
Please subscribe if you find it helpful.
C. Rudolf and the Ugly String | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Просмотров 737 месяцев назад
Please subscribe if you find it helpful.
A. Rudolf and the Ticket, B. Rudolf and 121 | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Просмотров 1227 месяцев назад
A. Rudolf and the Ticket, B. Rudolf and 121 | Codeforces Round 933 (Div. 3)| | Explanation in Hindi
Counting Rooms | CSES Sheet | Graph Algorithms
Просмотров 397 месяцев назад
Counting Rooms | CSES Sheet | Graph Algorithms
Divisor Analysis | CSES Sheet | Mathematics
Просмотров 1537 месяцев назад
Divisor Analysis | CSES Sheet | Mathematics
Maximum Strength of K Disjoint Subarrays | LeetCode Weekly Contest 388 | Explanation + Code
Просмотров 197 месяцев назад
Maximum Strength of K Disjoint Subarrays | LeetCode Weekly Contest 388 | Explanation Code
Shortest Uncommon Substring in an Array | LeetCode Weekly Contest 388 | Explanation + Code
Просмотров 417 месяцев назад
Shortest Uncommon Substring in an Array | LeetCode Weekly Contest 388 | Explanation Code
Maximize Happiness of Selected Children | LeetCode Weekly Contest 388 | Explanation + Code
Просмотров 137 месяцев назад
Maximize Happiness of Selected Children | LeetCode Weekly Contest 388 | Explanation Code
Apple Redistribution into Boxes | LeetCode Weekly Contest 388 | Explanation + Code
Просмотров 227 месяцев назад
Apple Redistribution into Boxes | LeetCode Weekly Contest 388 | Explanation Code
Swap and Unite | CodeChef STARTERS 124 | Explanation + Code
Просмотров 1177 месяцев назад
Swap and Unite | CodeChef STARTERS 124 | Explanation Code
Make It One | CodeChef STARTERS 124 | Explanation + Code
Просмотров 267 месяцев назад
Make It One | CodeChef STARTERS 124 | Explanation Code
Table Strength | CodeChef STARTERS 124 | Explanation + Code
Просмотров 337 месяцев назад
Table Strength | CodeChef STARTERS 124 | Explanation Code
Distribute Elements Into Two Arrays II | LeetCode Weekly Contest 387
Просмотров 257 месяцев назад
Distribute Elements Into Two Arrays II | LeetCode Weekly Contest 387
Minimum Operations to Write the Letter Y on a Grid | LeetCode Weekly Contest 387
Просмотров 417 месяцев назад
Minimum Operations to Write the Letter Y on a Grid | LeetCode Weekly Contest 387
Count Submatrices with Top-Left Element and Sum Less Than k | LeetCode Weekly Contest 387
Просмотров 117 месяцев назад
Count Submatrices with Top-Left Element and Sum Less Than k | LeetCode Weekly Contest 387
Find the Maximum Sum of Node Values | LeetCode Biweekly Contest 125 | Explanation + Code
Просмотров 557 месяцев назад
Find the Maximum Sum of Node Values | LeetCode Biweekly Contest 125 | Explanation Code
Count Pairs of Connectable Servers in a Weighted Tree Network | LeetCode Biweekly Contest 125
Просмотров 777 месяцев назад
Count Pairs of Connectable Servers in a Weighted Tree Network | LeetCode Biweekly Contest 125
awaaz to badi pyari hai
I just love your explanation , Thank you so much for this .
Congratulations for getting placed at Microsoft🎊 Can u share some suggestions to land such job for students.
Thanks
good content mam
nice solution😊
Good explained keep working
Thankyou!
i was struggling with this qn u explained very neatly.Thnx. whats ur cf handle btw?
how much is your rating on CF, give your email i wana connect with you
are u giving it or not?
I should say that your voice is stunning, i like it very much
Great explanation.
why are you using ai voice in you new videos, they are hurting my ears
Sorry for the inconvenience, I have used that to remove noise.
Nice Explanation
Helpful!!
Thanks for the explanation, very helpful !
Glad you liked it.
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 void solve() { int n; cin>>n; int cnt=0; for(int i=0;i<n;i++) { int temp; cin>>temp; if(temp == 2) cnt++; } if(cnt%8 == 0) { cout<<"YES "; } else cout<<"NO "; } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 void solve() { int n; cin>>n; string s; cin>>s; int zeros=0; for(int i=0;i<n;i++) { if(s[i]=='0') zeros++; } if(zeros == n||zeros ==0) { if(n%2 >0) { cout<<"Bob "; } else cout<<"Alice "; } else if(n>3) { if(n%2 >0) { //alice int temp = (n-3)/2; if(zeros<=temp || (n-zeros)<=temp) { cout<<"BOB "; } else cout<<"Alice "; } else { //bob int temp = (n-3)/2 + (n-3)%2; if(zeros<=temp || (n-zeros)<=temp) { cout<<"Alice "; } else cout<<"Bob "; } } else if(n==3){ cout<<"Alice "; } else cout<<"Bob "; } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 void solve() { int n,s; cin>>n>>s; int arr[n]; for(int i=0;i<n;i++) arr[i]=1; if(s%2 >0 || n==1||s<n) { cout<<"-1 "; return; } else if(n==3) { int temp = s/2,store=-1; for(int i=30;i>=0;i--) { if(((1ll<<i)&temp)>0) { store = i; break; } } if( store==-1 ||(1ll<<store) == temp) { cout<<"-1 "; return; } else { cout<<temp<<" "<<(1ll<<store)<<" "<<(temp-(1ll<<store))<<" "; return; } } else { if(n%2 == 0) { int temp = (s-(n-2))/2; arr[0] = temp; arr[1] = temp; } else { arr[0]=2; arr[1]=3; arr[2]=1; s-=(n-5)+6; if(s%2 >0 || s<2) { cout<<"-1 "; return; } else { arr[n-1]=s/2; arr[n-2]=s/2; } } } for(int i=0;i<n;i++) cout<<arr[i]<<" "; cout<<" "; } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Nice
Nice
thnx please keep uploading video solution of hard problems
Code: class Solution { public: pair<int,int> find(vector<vector<int>>& points,vector<int>&visited) { int n = points.size(); int maxy=-1; //x+y int mixy=-1; // x+y int yx=-1; // y-x int xy=-1; //x-y int ans =-1; int p1=-1; int p2=-1; for(int i=0;i<n;i++) { if(visited[i]==0) { if(maxy !=-1) { //x+y int d = abs(points[maxy][0]-points[i][0])+abs(points[maxy][1]-points[i][1]); if(d>ans) { p1 = i; p2 = maxy; ans = d; } } if(mixy !=-1) { //x+y minm int d = abs(points[mixy][0]-points[i][0])+abs(points[mixy][1]-points[i][1]); if(d>ans) { p1 = i; p2 = mixy; ans = d; } } if(yx !=-1) { int d = abs(points[yx][0]-points[i][0])+abs(points[yx][1]-points[i][1]); if(d>ans) { p1 = i; p2 = yx; ans = d; } } if(xy !=-1) { int d = abs(points[xy][0]-points[i][0])+abs(points[xy][1]-points[i][1]); if(d>ans) { p1 = i; p2 = xy; ans = d; } } // i x+y if(maxy <0 || points[maxy][0]+points[maxy][1]<points[i][0]+points[i][1]) maxy =i; if(mixy <0 || points[mixy][0]+points[mixy][1]>points[i][0]+points[i][1] ) mixy = i; //mixy = x+Y if(yx <0 || points[yx][1]-points[yx][0]<points[i][1]-points[i][0]) yx = i; if(xy <0 || points[xy][0]-points[xy][1]<points[i][0]-points[i][1]) xy =i; } } return {p1,p2}; } int minimumDistance(vector<vector<int>>& points) { int n = points.size(); vector<int>visited(n,0); pair<int,int>p = find(points,visited); // p1 visited[p.first]=1; pair<int,int>p1 = find(points,visited); int ans = abs(points[p1.first][0]-points[p1.second][0]) + abs(points[p1.second][1]-points[p1.first][1]); visited[p.first]=0; visited[p.second]=1; p1 = find(points,visited); ans = min(ans,abs(points[p1.first][0]-points[p1.second][0]) + abs(points[p1.second][1]-points[p1.first][1])); return ans; } };
Thanks, very well explained!
Didi AP bhi participate kiye the kya kal?
yes
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 void solve() { int n,l; cin>>n>>l; int curr=2,prev=1; cout<<"1 "; for(int i=0;i<n-1;i++) { if(curr+prev <= l) { cout<<curr<<" "; prev = curr; curr++; } else { curr=prev+l; cout<<curr<<" "; prev =curr; } } cout<<" "; } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 void solve() { int n,k,x; cin>>n>>k>>x; if(pow(2ll,k-1)<=x) { cout<<"YES "; } else cout<<"NO "; } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Hey, agar lets se array size is 100 and k=32, and x is very close to 10^9 then it might be possible that, the other indexes of array overflows 10^9, so what about that, we need to take care of that as well
@@devanshuu There is no bound on the elements we can use for the array , it can also go beyond 10^9
4 views lol
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define pp pair<int, int> #define mod 1000000007 int ffact[200001]; int mul(int x,int y){ return ((x%mod)*(y%mod))%mod; } int powers(int x,int p){ x=x%mod; if(p==0) return 1; if(p==1) return x%mod; int z=powers(x,p/2); if(p%2>0) return mul(x,mul(z,z)); return mul(z,z); } int dividing(int x,int y){ return mul(x,powers(y,mod-2)); } int ncr(int n,int r) { return dividing(ffact[n],mul(ffact[n-r],ffact[r])); } int fact(int n) { return ffact[n]; } void solve() { int n,m1,m2; cin>>n>>m1>>m2; int pref[m1]; int suff[m2]; int arr[n+1]; memset(arr,0,sizeof(arr)); for(int i=0;i<m1;i++) { cin>>pref[i]; arr[pref[i]]++; } for(int i=0;i<m2;i++){ cin>>suff[i]; arr[suff[i]]+=2; } if(pref[m1-1]!=suff[0] || pref[0]!=1 || suff[m2-1]!=n) { cout<<"0 "; return; } int front = pref[m1-1]-1, last = n-suff[0]; int ans = ncr(n-1,front); int ways = front; for(int i=front;i>=1;i--) { if(arr[i]!=1) { ans = mul(ans,(ways-1)); } ways--; } ways = last; for(int i=suff[0]+1;i<=n;i++) { if(arr[i]!=2) { ans = mul(ans,(ways-1)); } ways--; } cout<<ans<<" "; } int32_t main() { int t = 1; cin >> t; ffact[1]=1; ffact[0]=1; for(int i=2;i<200001;i++) { ffact[i]=mul(ffact[i-1],i); } while (t > 0) { t--; solve(); } }
Maine aap k liye video eadit and . Thumbnail bnaa k de skta hun ❤ free
Thank you so much for your kindness.
Amazing explainaition ma'am. Please keep making these. Also just 1request that whenever u r explaining the concept of a question, please do so with the help of an example that is by taking actual numners and not by variables. Please ma'am
Sure :)
Great explanation ❤
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define p pair<int, int> void solve() { int n; cin >> n; for(int i=30;i>=0;i--) { if((1ll<<i) <=n) { cout<<(1ll<<i)<<" "; return; } } } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
hello , where r u from ?
can you please copy paste the code in the comments so that i will convert this in python bcz i did learn C but not cpp...
Code: #include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set<int> #define p pair<int, int> void solve() { int n; cin >> n; for(int i=30;i>=0;i--) { if((1ll<<i) <=n) { cout<<(1ll<<i)<<" "; return; } } } int32_t main() { int t = 1; cin >> t; while (t > 0) { t--; solve(); } }
Will you make video on problem G of this round(933), I'm not able to get the intuition from the tutorial
will make it.
@@cowo08 Thanks, btw great explanation
kuch samjh nhi aya :((
you know how a priority queue works (min heap ). study the data structure and then rewatch
great explanation .
Very Well Explained 🙌
pretty good explanation
Are you on codeforces also?
yes, You can get the latest codeforces contest videos on this channel.
Awesome explaination.Pls cover the solutions for other cses problems also
Sure:)
Working professional?
No
@@cowo08 everybody have exams now that's why I thought (except iits)
Nice Explanation
Where are you From? Which College? Can I connect with you any social platform linkedin or anything? By the way, your teaching skill is good. I stuck at c but now i understand this ❤❤
great video
your videos are really helpful
congrats for the 100 subscriber
Would it be possible for you to provide English subtitles or explanations alongside your Hindi content? It would make your tutorials more accessible to viewers like me who don't speak Hindi.
Thankyou for the feedback. Will keep that mind :)
explained correctly