@@Musclemafia0 now onwards I will upload the videos regularly
@planetatlasvip30384 ай бұрын
français formation python, ---------------------------merci
@akcGaming-e5h5 ай бұрын
Getting TLE on this
@bhavishykhandelwal17475 ай бұрын
No broo its accepted
@Musclemafia05 ай бұрын
Best teacher ever❤
@Musclemafia05 ай бұрын
Best teacher🎉
@Abhishek7Shah5 ай бұрын
Use Dry RUn
@Abhishek7Shah5 ай бұрын
it'Z Easy After WAtching ur video Keeps it up.
@bhavishykhandelwal17475 ай бұрын
@@Abhishek7Shah thanks broo keep it up 👍
@Hithpath5 ай бұрын
Pintu bhaiya me tiya
@bhavishykhandelwal17475 ай бұрын
❤️
@bkmeher90056 ай бұрын
superb
@bhavishykhandelwal17476 ай бұрын
Thanks bhai
@Harsh-jc2bz6 ай бұрын
nice
@bhavishykhandelwal17476 ай бұрын
Thanks bhai ❤️
@pavanadityasairamchegu49776 ай бұрын
Where's the sound
@bhavishykhandelwal17476 ай бұрын
Broo I know sound is low but it is not like that you cant hear , by the way thanks to share your review ,I will increase it very soon
@pavanadityasairamchegu49776 ай бұрын
@@bhavishykhandelwal1747 thank you
@Musclemafia07 ай бұрын
Sir starting se hindi me batao jyada sahi se hoga
@NamanTiwari-og6u8 ай бұрын
❤
@NamanTiwari-og6u8 ай бұрын
Very nice 🥰❤
@NamanTiwari-og6u8 ай бұрын
❤
@NamanTiwari-og6u8 ай бұрын
❤
@NamanTiwari-og6u8 ай бұрын
❤
@NamanTiwari-og6u8 ай бұрын
🙏🙏🙏🙏🙏🕉️🕉️🕉️
@NamanTiwari-og6u8 ай бұрын
❤
@NamanTiwari-og6u8 ай бұрын
Very nice 🥰 bhabhishya khandelwal ❤❤❤
@NamanTiwari-og6u8 ай бұрын
Very nice 🥰
@NamanTiwari-og6u8 ай бұрын
Very nice 🥰 bro
@bhavishykhandelwal17478 ай бұрын
Thanks 🤗
@Harsh-jc2bz9 ай бұрын
Nice
@bhavishykhandelwal17479 ай бұрын
Thanks
@abdulhannan81299 ай бұрын
Bro I am not good at maths so can I learn dsa and actually become good at it
@bhavishykhandelwal17479 ай бұрын
Dsa does not want high level math ,you should have enough knowledge of basics of mathematical operations .
@gvphysicsinstitute251610 ай бұрын
Nice video ❤
@gvphysicsinstitute251610 ай бұрын
Wahhhh chhore ❤❤❤❤
@thedivineaurora933610 ай бұрын
aaj ka potd 😂majak bana diya . abhi tk example testcase galat hai
@bhavishykhandelwal174710 ай бұрын
Cant say about gfg 😂 kuch bhi kr skte hai ye log
@saswatrath464610 ай бұрын
I haven't tried for a two pointer approach I think if I could figure out one, it will be solvable in O(N) TC instead of O(N log N)
@bhavishykhandelwal174710 ай бұрын
Yess broo definitely 👍
@bhavishykhandelwal174710 ай бұрын
Code C++: Time Complexity : O(N3) int findTheCity(int n, vector<vector<int>>& edges, int distanceThreshold) { vector<vector<int>>dist(n,vector<int>(n,INT_MAX)); for(int i=0;i<n;i++) dist[i][i]=0; for(vector<int>v:edges) { dist[v[0]][v[1]] = v[2]; dist[v[1]][v[0]] = v[2]; } for(int k=0;k<n;k++) //pivot { for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { if(dist[i][k]!=INT_MAX && dist[k][j]!=INT_MAX &&dist[i][k]+dist[k][j]<dist[i][j]) dist[i][j]= dist[i][k]+dist[k][j]; } } } int citycount; int ans; for(int i=0;i<n;i++) { int count = 0; for(int j=0;j<n;j++) { if(i!=j && dist[i][j]<= distanceThreshold) count++; } if(count<=citycount) { ans = i; citycount = count; } } return ans; }
@Ambikagurjar774710 ай бұрын
Keep going bro👍👍👍
@bhavishykhandelwal174710 ай бұрын
Thanks
@Arthur-qp3xc11 ай бұрын
😄 P r o m o S M
@pushpadj97411 ай бұрын
Great bro 👍 but here can we use moore voting algorithm which time complexity O(n) and space complexity O(1) ?
@bhavishykhandelwal174711 ай бұрын
Offcourse bro that is the optimized approach for this
@aksharasharma804711 ай бұрын
For your thumbnail- you need a girl to solve those problems 😂
@bhavishykhandelwal174711 ай бұрын
I wrote no need of girl if you have such kind of problems 😂
@karlguniker8371 Жыл бұрын
how does this work? 10:40
@bhavishykhandelwal1747 Жыл бұрын
broo see , if my index will go at the end of the array it means we did not get any partition so in that case we will return 0 . we will create partition such that the length of the particular partition should not cross the value of k , and in each partition we will find the maximum element and also the length of the particular partition and the maximum element and when we multiply these two this will give me the maximum sum of the particular partition and further we call a function for recursion then for optimisation we use memorization this was it if you find the helpful then please like share and subscribe❤
@karlguniker8371 Жыл бұрын
@@bhavishykhandelwal1747 Thank you so much for your super quick response, I think I got it now. I was stuck with my data analysis for the lab, this helped me! I just noticed how recent the video is, I am so lucky to have found this. Thanks man
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0 Жыл бұрын
Love from Hyderabad ❤
@Musclemafia0 Жыл бұрын
Thankyou sir ❤
@Sandeep_P_Patil Жыл бұрын
Sound is not getting properly
@bhavishykhandelwal1747 Жыл бұрын
I will improve ❤
@bhavishykhandelwal1747 Жыл бұрын
#include<iostream> using namespace std; void printArray(int arr[],int size){ cout<<"Printing the array"<<endl; for(int i=0;i<size;i++){ cout<<arr[i]<<" "; } cout<<endl; } int getMax(int arr[],int n){ int maxi=INT_MIN; for(int i=0;i<n;i++){ if(arr[i]>maxi){ maxi=arr[i]; } } return maxi; } int getMin(int arr[],int n){ int mini=INT_MAX; for(int i=0;i<n;i++){ if(arr[i]<mini){ mini=arr[i]; } } return mini; } bool search(int arr[],int n,int key){ for(int i=0;i<n;i++){ if(arr[i]==key){ return 1; } } return 0; } int main(){ int arr[15]; cout<<"value at 14 index"<<arr[14]<<" "<<endl; cout<<"value at 7 index"<<arr[7]<<" "<<endl; int arr1[3]={5,7,6}; cout<<"value at 0th index"<<arr1[0]<<" "<<endl; cout<<"value at 0th index"<<arr1[1]<<" "<<endl; int arr2[9]={4,5}; cout<<"value at 7th index"<<arr2[1]<<endl; // for(int i=0;i<10;i++){ // cout<<arr2[i]<<" "; // } // cout<<endl; printArray(arr2,10); int arr3[10]={0}; // for(int i=0;i<10;i++){ // cout<<arr3[i]<<" "; // } // cout<<endl; printArray(arr3,10); int arr4[10]={1}; // for(int i=0;i<10;i++){ // cout<<arr4[i]<<" "; // } // cout<<endl; printArray(arr4,10); // int size; // cin>>size; // int arr5[size]; // for(int i=0;i<size;i++){ // cin>>arr5[i]; // } // printArray(arr5,size); // int sizeOfarr2=sizeof(arr2)/sizeof(int); // cout<<"size of arr2"<<sizeOfarr2<<" "<< endl; // char ch[5]={'p','q','r','s','t'}; // cout<<ch[3]<<endl; //maxmin // int size; // cin>>size; // int ram[100]; // for(int i=0;i<size;i++){ // cin>>ram[i]; // } // cout<<"maximum element is"<<getMax(ram,size)<<endl; // cout<<"minimum element is"<<getMin(ram,size)<<endl; //linear search int dost[10]={-1,2,3,-4,6,8,-9,0,1,-5}; int element; cin>>element; bool found=search(dost,10,element); if(found){ cout<<"Element is present in array"<<endl; } else{ cout<<"Element is absent in array"<<endl; } }
@Srijan101xz Жыл бұрын
nice explain
@ayushimittal867 Жыл бұрын
Long time....
@rockstar-yl9sd Жыл бұрын
Nice explanation as well as algorithmic approach
@bhavishykhandelwal1747 Жыл бұрын
Thanks broo
@rockstar-yl9sd Жыл бұрын
Bro do you use Instagram
@rushyya Жыл бұрын
Great Video Bro !
@bhavishykhandelwal1747 Жыл бұрын
Thanks bro!
@tarangpatil6952 Жыл бұрын
This one takes O(n^2) time. A faster solution is: #include <iostream> #include <string> using namespace std; class Solution { public: string reverseWords(string str) { int n = str.size(); string result{""}; string temp{""}; for (int i = 0; i < n; i++) { if (str[i] != ' ') { temp = str[i] + temp; } else { result = result + temp + " "; temp = ""; } } return result + temp + "\0"; } }; int main() { Solution sol; cout << sol.reverseWords("This is a sentence "); return 0; } This one does it in linear time