Be honest during the contest it gives you more benefit and boost ur problem solving skill apart from that Cheaters always detected so dont think about them👍👍👍
@ankitghosh9873Ай бұрын
worst explanation ever
@VishalYadav-gk1kgАй бұрын
Very nice explanation sir, Thank you!
@user-nn4yq3pp9uАй бұрын
explain karna nahin aata
@abhishekpokale37972 ай бұрын
I have tried to use the normal sorting order, can anyone tell why this is not working? vector<int> ans(k-1,-1); sort(arr,arr+n , greater<int>()); for(int i = n-1 ;i>=k-1;i--){ ans.push_back(arr[i]); } return ans;
@shashank_08072 ай бұрын
Watching this on 8th June 2024 ! 🤣
@user-jh6gm4fh2m2 ай бұрын
thanks sir
@daughter_of_chitkute06113 ай бұрын
is it possible to generalize it without using freopen instead do some setting in the VS code so that it works for all cpp files without writing these lines of code again and again.
@ankitshiksharthi31413 ай бұрын
Answer match nahi ho rha hai ...
@nischayagrawalVlogs3 ай бұрын
7:24 wala scenerio problematic case nai hoga coz usme bhi usko 12 steps lagenge aur 7:40 wale me bhi 12 steps lagenge kyuki usko wapas apne initial position pe bhi ana h. Correct me If I am wrong. Sirf Itne code se bhi kam ho jayega #include <bits/stdc++.h> using namespace std; void I_LOVE_CP(){ int n,m,i,j; cin>>n>>m>>i>>j; cout<<1<<" "<<1<<" "; cout<<n<<" "<<m<<" "; cout<<endl; } int main(){ int t=1; cin>>t; while (t--) I_LOVE_CP(); }
@JamilAhmad-ld3br3 ай бұрын
worst explantion
@KlopLol-rd9pm4 ай бұрын
this can be solved using greedy also
@VishalYadav-gk1kg4 ай бұрын
Very nice explanation sir, Thank you!
@Negijicoder5 ай бұрын
amazing after dry run
@VishalYadav-gk1kg5 ай бұрын
very nice explanation sir, Thank you!
@MrKB_SSJ25 ай бұрын
This is such a smart move!!! Damn 🔥
@VishalYadav-gk1kg5 ай бұрын
very nice explanation sir, Thank you!
@VishalYadav-gk1kg5 ай бұрын
very nice explanation sir, Thank you!
@nishantbisandre59535 ай бұрын
This is wrong
@kavishmathur22725 ай бұрын
amazing explanation bro thanks now i have a logic to how to solve it. You earned my subscribe dude keep it up.
@VishalYadav-gk1kg5 ай бұрын
Very nice explanation sir, Thank you!
@asanitian62185 ай бұрын
Nicely explained ❤
@saurabh.gupta225 ай бұрын
Amazing explanation
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation sir, Thank you!
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation sir, Thank you!
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation sir, Thank you!
@professor86286 ай бұрын
good explaination
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation , Thank you!
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation sir, Thank you!
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation, Thank you!
@VishalYadav-gk1kg6 ай бұрын
Very nice explanation ,Thank you!
@rahuljha87326 ай бұрын
Your code shows runtime error.
@stutimishra20056 ай бұрын
thank you sir
@anishwagle25466 ай бұрын
Thanks a lot for the soln . Was searching the soln for a long time . Perfectly explained . Cleared all doubts
@saurabh.gupta226 ай бұрын
great
@mukulpal92726 ай бұрын
my screen is showing TLE error
@harveycrimsond39476 ай бұрын
For those of you who are unable to understand the dp concept of problem d, the base cases are size 2 subarrays and size 3 subarrays. The size 2 subarrays will help build size 4 because L + size2subarraysum + R will be the size4subarraysum and L + size4subarraysum + R will be size6subarraysum and so on. We will get sums for all even subarrays. Similarly size 3 subarrays will serve as the base case for all odd length subarrays. L + size3subarraysum + R will be size5subarraysum and so on.....
@vishalbairagi53647 ай бұрын
thank you
@MrKB_SSJ27 ай бұрын
How am I supposed to discover these crucial tricks in the middle of the contest !!!
@ranaabhijeet4977 ай бұрын
why dynamic programming solution give tle can you compare the time complexity of greedy vs dynamic programming time complexity. here is my dp code: /* #include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> #define pb push_back #define ppb pop_back #define pr pair #define all(x) x.begin(),x.end() ll is(string s, string t, ll n, vector<ll>& curr,vector<ll>&prev,vector<ll>&prev2, ll m) { fill(curr.begin(), curr.end(), 0); curr[0] = 1; for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { ll h=0,g=0; if (s[i - 1] == t[j - 1]) { h = prev[j-1]; } else { if(i-2>=0) g= prev2[j]; } curr[j]=h||g; } prev2=prev; prev=curr; } return prev[m]; } int main() { ll t; cin >> t; while (t--) { string s, target; cin >> s >> target; ll m = target.length(); ll n = s.length(); vector<ll> prev(m + 1, 0); vector<ll> curr(m + 1, 0); vector<ll> prev2(m + 1, 0); if (m > n) { cout << "NO" << endl; } else { if (is(s, target, n, curr,prev,prev2, m)) { cout << "YES" << endl; } else { cout << "NO" << endl; } } } return 0; } */
@iguessidontcare57377 ай бұрын
nt working with my vs code i click on the extension icon but it doesnt load into vscode
@rohitenwurd92947 ай бұрын
volume bohot zyada hai video ka aur thoda kam karo
@tsarprince7 ай бұрын
bruh
@vishalbairagi53647 ай бұрын
thanks
@user-ky1ug2ex5x7 ай бұрын
Does there exist some sort of dfs based approach by constructing a graph, like calculting the longest assinging chain such that if u-> v , v is not assigened early
@imyasharya8 ай бұрын
Here's my solution to the same in java: ``` public int solve(ArrayList<Integer> A) { for (int i = 31; i >= 0; i--) { ArrayList<Integer> res = new ArrayList<>(); for (int j = 0; j < A.size(); j++) { if ((A.get(j) & (1 << i)) == (1 << i)) { res.add(A.get(j)); } } if (res.size() >= 2) { A = res; } } return (A.get(0) & A.get(1)); } ```