Пікірлер
@Musclemafia0
@Musclemafia0 19 күн бұрын
#code
@Musclemafia0
@Musclemafia0 20 күн бұрын
Back in the form🔥🔥
@FODCAST23
@FODCAST23 Ай бұрын
thanks
@Musclemafia0
@Musclemafia0 3 ай бұрын
Sir❤❤❤
@Musclemafia0
@Musclemafia0 4 ай бұрын
Waited for you sir like crazy 😊
@bhavishykhandelwal1747
@bhavishykhandelwal1747 4 ай бұрын
@@Musclemafia0 now onwards I will upload the videos regularly
@planetatlasvip3038
@planetatlasvip3038 4 ай бұрын
français formation python, ---------------------------merci
@akcGaming-e5h
@akcGaming-e5h 5 ай бұрын
Getting TLE on this
@bhavishykhandelwal1747
@bhavishykhandelwal1747 5 ай бұрын
No broo its accepted
@Musclemafia0
@Musclemafia0 5 ай бұрын
Best teacher ever❤
@Musclemafia0
@Musclemafia0 5 ай бұрын
Best teacher🎉
@Abhishek7Shah
@Abhishek7Shah 5 ай бұрын
Use Dry RUn
@Abhishek7Shah
@Abhishek7Shah 5 ай бұрын
it'Z Easy After WAtching ur video Keeps it up.
@bhavishykhandelwal1747
@bhavishykhandelwal1747 5 ай бұрын
@@Abhishek7Shah thanks broo keep it up 👍
@Hithpath
@Hithpath 5 ай бұрын
Pintu bhaiya me tiya
@bhavishykhandelwal1747
@bhavishykhandelwal1747 5 ай бұрын
❤️
@bkmeher9005
@bkmeher9005 6 ай бұрын
superb
@bhavishykhandelwal1747
@bhavishykhandelwal1747 6 ай бұрын
Thanks bhai
@Harsh-jc2bz
@Harsh-jc2bz 6 ай бұрын
nice
@bhavishykhandelwal1747
@bhavishykhandelwal1747 6 ай бұрын
Thanks bhai ❤️
@pavanadityasairamchegu4977
@pavanadityasairamchegu4977 6 ай бұрын
Where's the sound
@bhavishykhandelwal1747
@bhavishykhandelwal1747 6 ай бұрын
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
@pavanadityasairamchegu4977
@pavanadityasairamchegu4977 6 ай бұрын
@@bhavishykhandelwal1747 thank you
@Musclemafia0
@Musclemafia0 7 ай бұрын
Sir starting se hindi me batao jyada sahi se hoga
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
Very nice 🥰❤
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
🙏🙏🙏🙏🙏🕉️🕉️🕉️
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
Very nice 🥰 bhabhishya khandelwal ❤❤❤
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
Very nice 🥰
@NamanTiwari-og6u
@NamanTiwari-og6u 8 ай бұрын
Very nice 🥰 bro
@bhavishykhandelwal1747
@bhavishykhandelwal1747 8 ай бұрын
Thanks 🤗
@Harsh-jc2bz
@Harsh-jc2bz 9 ай бұрын
Nice
@bhavishykhandelwal1747
@bhavishykhandelwal1747 9 ай бұрын
Thanks
@abdulhannan8129
@abdulhannan8129 9 ай бұрын
Bro I am not good at maths so can I learn dsa and actually become good at it
@bhavishykhandelwal1747
@bhavishykhandelwal1747 9 ай бұрын
Dsa does not want high level math ,you should have enough knowledge of basics of mathematical operations .
@gvphysicsinstitute2516
@gvphysicsinstitute2516 10 ай бұрын
Nice video ❤
@gvphysicsinstitute2516
@gvphysicsinstitute2516 10 ай бұрын
Wahhhh chhore ❤❤❤❤
@thedivineaurora9336
@thedivineaurora9336 10 ай бұрын
aaj ka potd 😂majak bana diya . abhi tk example testcase galat hai
@bhavishykhandelwal1747
@bhavishykhandelwal1747 10 ай бұрын
Cant say about gfg 😂 kuch bhi kr skte hai ye log
@saswatrath4646
@saswatrath4646 10 ай бұрын
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)
@bhavishykhandelwal1747
@bhavishykhandelwal1747 10 ай бұрын
Yess broo definitely 👍
@bhavishykhandelwal1747
@bhavishykhandelwal1747 10 ай бұрын
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; }
@Ambikagurjar7747
@Ambikagurjar7747 10 ай бұрын
Keep going bro👍👍👍
@bhavishykhandelwal1747
@bhavishykhandelwal1747 10 ай бұрын
Thanks
@Arthur-qp3xc
@Arthur-qp3xc 11 ай бұрын
😄 P r o m o S M
@pushpadj974
@pushpadj974 11 ай бұрын
Great bro 👍 but here can we use moore voting algorithm which time complexity O(n) and space complexity O(1) ?
@bhavishykhandelwal1747
@bhavishykhandelwal1747 11 ай бұрын
Offcourse bro that is the optimized approach for this
@aksharasharma8047
@aksharasharma8047 11 ай бұрын
For your thumbnail- you need a girl to solve those problems 😂
@bhavishykhandelwal1747
@bhavishykhandelwal1747 11 ай бұрын
I wrote no need of girl if you have such kind of problems 😂
@karlguniker8371
@karlguniker8371 Жыл бұрын
how does this work? 10:40
@bhavishykhandelwal1747
@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
@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
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0
@Musclemafia0 Жыл бұрын
King sir is back
@Musclemafia0
@Musclemafia0 Жыл бұрын
Love from Hyderabad ❤
@Musclemafia0
@Musclemafia0 Жыл бұрын
Thankyou sir ❤
@Sandeep_P_Patil
@Sandeep_P_Patil Жыл бұрын
Sound is not getting properly
@bhavishykhandelwal1747
@bhavishykhandelwal1747 Жыл бұрын
I will improve ❤
@bhavishykhandelwal1747
@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
@Srijan101xz Жыл бұрын
nice explain
@ayushimittal867
@ayushimittal867 Жыл бұрын
Long time....
@rockstar-yl9sd
@rockstar-yl9sd Жыл бұрын
Nice explanation as well as algorithmic approach
@bhavishykhandelwal1747
@bhavishykhandelwal1747 Жыл бұрын
Thanks broo
@rockstar-yl9sd
@rockstar-yl9sd Жыл бұрын
Bro do you use Instagram
@rushyya
@rushyya Жыл бұрын
Great Video Bro !
@bhavishykhandelwal1747
@bhavishykhandelwal1747 Жыл бұрын
Thanks bro!
@tarangpatil6952
@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
@bhavishykhandelwal1747
@bhavishykhandelwal1747 Жыл бұрын
Good