Beautifully explained ! Helping a lot sir , I basically have a look at the daily q in the morning itself and if I'm unable to solve it by night I watch your video, keep up the good work......Thankyou !
Basically, it's not about costs means (/) isn't that way costly, its all about precision & comparity check, means sometimes makes ambiguity to compare float values & gives unexpected results.
You are really great bhaiya firstly when I was trying to solve the problem I also use the concept of slope that when all the pair of coordinate have same slope then we will have a straight line but I was wrong. But after seeing your vedio I got to know that where I was wrong my approach only count consecutive set of coordinate for which slope is same just like leetcode example no 1 and after seeing your vedio I got my doubt clear and for that I am really very thankful to you bhaiya
@@codestorywithMIK just wanted to ask one thing bhaiya in your second approach where you used map and in that approach you halve created map for for every i inside that each time the loop run there will be map created will that not be time and memory consuming Instead of that We will create a map outside the loop and when we got our result then we will clear the map is that will be right
What a timing. .... Though I coded it myself But I just came to your channel to see your approach but upload ni hui thi video... And then suddenly your video came😅
It's failing for 34/35 test case [[2,3],[3,3],[-5,3]] Expected-3 Output-2 Please Help. . class Solution { public int maxPoints(int[][] points) { int n=points.length; if(n==1){ return 1; } int max=0; for(int i=0;i
Literally har Qn me depth tak, different ways, brute force and what not.
You provide so much information within just one video. This is just amazing
This was your first video I have watched. Now, I am one of your subscribers. Loved the way you explained & thanks for your effort!!! 💯
Thank you so much Siddhartha ❤️❤️❤️
Top Notch 🔥
I no longer get scared of Hard Qns, I know that if I don't understand it, your videos will make it easy
Thanks
Thank you! This was very helpful
Glad it was helpful! 🙏😇
Top Notch 🔥, beautifully explained
Your explanations are amazing, just love it.
Thanks a lot Saurabh ❤️❤️❤️
thanks a lot bhaiya, all concepts clear. love youuu
So glad to help Shiv. 💪❤️
Explanation🔥🔥 ....Itna acha intuition syd hi kahi mile
Thank you so so much Sanjeeb ❤️
Beautiful solution loved it❤️
Tysm ❤️❤️❤️
Beautifully explained ! Helping a lot sir , I basically have a look at the daily q in the morning itself and if I'm unable to solve it by night I watch your video,
keep up the good work......Thankyou !
Thanks a lot Dev ❤️❤️❤️
Crisp and clean
Thanks for the brute force again
Thanks for your topnotch explaination.
Thank you so much for watching 😇❤️
awesome explanation. Can you please provide the solution in java as well
you can also use simple map , and if( demominator is zero ) then use INT_MAX as key
which is also fine
Bhai kadi acha samjha te ho.Bas lage raho
Thank you so much ❤️❤️❤️
Excellent loved it🤩
Thanks a lot 😇😇😇
13:26 I was dividing and getting cannot divide by 0 exception. Multiplying solves it :)
Thanks again bhaiya.
Awesome
Thanks a lot Rishav ❤️❤️❤️
You teach great!! Also, in brute force method, if we start k from j + 1 then it reduces the TC and Run time becomes 8ms and beats 99% submission.
Awesome Gaurav. That was an important optimisation you mentioned.
Thanks a lot ❤️❤️❤️
wow 💯
Thanks a lot ❤️❤️❤️
Basically, it's not about costs means (/) isn't that way costly, its all about precision & comparity check, means sometimes makes ambiguity to compare float values & gives unexpected results.
Bro tum contests ke bhi solutions discuss Karo please...especially of the fourth problem... nobody explains it well in the discuss section
Will soon plan Girik.
Thanks a lot for sharing your suggestions ❤️
Veryy wellll explained bro 🔥🤌 bro hope u continue to tell us brute force and optimal method like this one
Concepts are clear--straight into head 🙌👏👏
Thanks a lot Harsh. ❤️❤️❤️
Sure, always
Great Explanation 😍
Thanks a lot Arjun ❤️❤️❤️
Great Explanation Bro.👏👏
Thanks a lot ❤️❤️❤️
What a nice explanation.
Thanks a lot 😊
Thanks a lot Prabir ❤️❤️❤️
great video on this question :)
Thanks bro, for always helping us.
Anytime 👍🏻❤️
You are really great bhaiya firstly when I was trying to solve the problem I also use the concept of slope that when all the pair of coordinate have same slope then we will have a straight line but I was wrong.
But after seeing your vedio I got to know that where I was wrong my approach only count consecutive set of coordinate for which slope is same just like leetcode example no 1 and after seeing your vedio I got my doubt clear and for that I am really very thankful to you bhaiya
I am so glad.
Thanks a lot Uday ❤️❤️❤️
@@codestorywithMIK just wanted to ask one thing bhaiya in your second approach where you used map and in that approach you halve created map for for every i inside that each time the loop run there will be map created will that not be time and memory consuming
Instead of that We will create a map outside the loop and when we got our result then we will clear the map is that will be right
Yes that approach is also good. Create a map outside, the clear it before every loop. Good one Uday 👍🏻
I thought of map approach first but didn't know there's a function inbuilt for tan
Thank you Brother😊😊
Thanks Abhinav for watching ❤️❤️❤️
Book allocation, aggressive cow pleaseeeeee
Soon ❤️❤️❤️
What a timing. .... Though I coded it myself
But I just came to your channel to see your approach but upload ni hui thi video... And then suddenly your video came😅
❤️💪
thank you :)
Glad I could help Yash ❤️❤️❤️
bro why store theta or gcd string where we can simply store dy/dx in the map handling div by 0 edge case?
can you make videos on contest questions also?
I will soon plan for this too.
Slowly getting on track
Thanks a lot for your suggestion 😊
One request, please also use Java language. like some of c++ function are not available in Java
What if the length of points is 1e6?
Sir u are checking slope but what if lines are parallel means even then there slope will be same but lines are different 😢
Sir meine atan2 and _gcd ke bina hi kardiya isse accept hogaya tha. 🌝
Awesome
Keep it up 👍🏻💪💪
mujhe laga tha maine map wla jo sol likha hai whi brute force hai but yha toh scene ulta hi tha lol
It's failing for 34/35 test case
[[2,3],[3,3],[-5,3]]
Expected-3
Output-2
Please Help.
.
class Solution {
public int maxPoints(int[][] points) {
int n=points.length;
if(n==1){
return 1;
}
int max=0;
for(int i=0;i
I checked in my IDE, your code works fine. Yeah but in leetcode ide, exception comes for [[2,3],[3,3],[-5,3]]--> Output=2 point but Expected=3 point
L....E...G...E....N...D