i cannot understand how you do n steps then say that it takes n^2, i cannot wrap my head around this please clarify. like at 11:22.
@algorithmsbysharmathankach7521Ай бұрын
"n" step, and kth step takes roughly "k" time. So, total time for steps k = 1,2,3,..n is Big-O of (1+2+3+...+n), which is n(n+1)/2 [arithmetic progression], which can be written as O(n^2).
@mehdiboudourАй бұрын
Thank you sir, finally understood it thanks to you.
@radhe_krashnaАй бұрын
why it is 7
@algorithmsbysharmathankach7521Ай бұрын
its clear in the proof, there are 8 boxes, so if we fix one box for one point, they we have other 7 possible boxes for the other point
@radhe_krashnaАй бұрын
@@algorithmsbysharmathankach7521 it should be 4 rather than 7
@sukhmanjitsingh27053 ай бұрын
For correctness of we are comparing points sorted by y axis, what if there are 7 points in the other quadrant more than d distance away and 1 point directly underneath which is super close we missed that point and in end gave inaccurate result
@algorithmsbysharmathankach75213 ай бұрын
Suppose "p" is the current point and "q" is the other point (which is super close and underneath p) and (p,q) is the closest pair. You are right, this pair wont be captured while doing our procedure at "p", but it will be captured when we do our procedure at "q''.
@sukhmanjitsingh27053 ай бұрын
@@algorithmsbysharmathankach7521 we take a look at next 7 points right and not the ones that are already scanned
@sukhmanjitsingh27053 ай бұрын
@@algorithmsbysharmathankach7521 the points are sorted by y co ordinate and we check with next 7 points not previous ones
@gurmeet01083 ай бұрын
Very very well done video, thanks a lot for sharing.
@user-bw5lp6uj5t3 ай бұрын
good explanation
@anonymousstudent21824 ай бұрын
fantastic explanation
@adityaband69195 ай бұрын
Amazing
@kelstonkkk5 ай бұрын
Thanks you, best explanation of this I have seen so far
@saichaithrik71345 ай бұрын
your explanation is one of the best I have seen thank you so much sir
@ktmi30376 ай бұрын
this is great! thank you! why don't professors explain in a similar manner instead of showing 20 slides for 40 min...
@dmitricherleto82346 ай бұрын
I understand that each box can have at most one point but why do we even need to compare 7 since the distance on the left half or right half region is at most d. Why don't we just compare the points between the two regions?
@algorithmsbysharmathankach75216 ай бұрын
Yes, we can fix a point (on a side) and just compare it with 4 (instead of 7) points on the other side. But these 4 points can be anyone's among the next 7 points (if we sort with respect to Y). So, we might still need to examine the next 7 points. The answer is yes, we can do a bit of optimization here, but the asymptotic time will be the same.
@shubhadeepchatterjee56576 ай бұрын
Hey Sir, your videos are nice. Why your videos not coming up?
@user-cb2gu4be7x6 ай бұрын
this is the exact explanation i was looking for. Very well explained
@NirmalSharonJoji6 ай бұрын
Thank you, Amazing video !!
@ZephyrrCummins6 ай бұрын
Very well explained !!
@valeriacarrillo91936 ай бұрын
thank you so much this helped a lot!!!
@sunilthunga56626 ай бұрын
Excellent Explanation!
@claywrentz31197 ай бұрын
Thank you beast
@user-gc1xu1kr3f9 ай бұрын
very informative
@suryaram687410 ай бұрын
❤🔥
@janapalaswathi426211 ай бұрын
Well explained.. 👏
@flashdude6411 ай бұрын
holy shit I was looking for an understanding of why its 7 points. you are the most clear an concise. thank you
@shantipriya37011 ай бұрын
thank you so much..
@animanoukiann Жыл бұрын
I appreciate this. You helped me from suffering of stress about not understanding that recurrence relation and the theorem and its proof🙏
@Astha_01 Жыл бұрын
Highly appreciate your explanation!!
@user-fk1rc4me1u Жыл бұрын
Thanks for the videos Sharma! You are a great teacher. Any more videos coming up?
@algorithmsbysharmathankach7521 Жыл бұрын
will do :)
@Jytx7 Жыл бұрын
After two years, this still helps thanks I see that you are joyful when teaching and I appreciate you doing this.
@yaotingchen Жыл бұрын
thank you so much!
@barkobi5852 Жыл бұрын
love from Israeli programmers!
@jaskaransingh0304 Жыл бұрын
Great explanation
@kevb9106 Жыл бұрын
Can we choose 4 instead of 5?
@algorithmsbysharmathankach7521 Жыл бұрын
It will be ugly -- like how we choose the median of 4 numbers? A definition like the mean of 2nd and 3nd number is problematic, since this is the comparison model (meaning u can compare elements, but you may not even get to know the "absolute" value of elements). So, one option is fix either of the 2nd or 3rd element (among 4) as the median. Then the recurrence will look like T(n) = T(n/4)+T(3n/4)+O(n), which is not O(n), but \Theta(n log n). So the answer is NO.
@18sp01 Жыл бұрын
Thank you, this video helped me fully understand!!
@khuyendominh4032 Жыл бұрын
great explanation :))
@KaranKumar-by7ko Жыл бұрын
Dhanyawad guru ji
@shreyaspanyam2926 Жыл бұрын
Great video and great explanation too!
@carlavn2470 Жыл бұрын
Shouldn't the counter at 8 be 4?
@algorithmsbysharmathankach7521 Жыл бұрын
I was counting in the other direction --- i.e.,for each number, how many are on its RIGHT side that are smaller.
@carlavn2470 Жыл бұрын
@@algorithmsbysharmathankach7521 right, I get that. But if we are using the R side as a counter, shouldn't the count change to 4 instead of staying as 3 at digit 8?
@algorithmsbysharmathankach7521 Жыл бұрын
@@carlavn2470 didn't get it, can you tell me where exactly (time in the video) is the mistake?
@carlavn2470 Жыл бұрын
@@algorithmsbysharmathankach7521 at min 17:48
@algorithmsbysharmathankach7521 Жыл бұрын
@@carlavn2470 yes, it is 4 (my bad) -- thankyou!
@yourvirgochild Жыл бұрын
Much needed explanation! 👍
@pawanmishra4067 Жыл бұрын
can you pl tell the exercise number in Computational geometry book ?
@maisiez882 Жыл бұрын
Thank you! wish i found this video before my algorithms exams...
@maisiez882 Жыл бұрын
THANK YOU this is so clear and thorough answered all my questions on this topic with bonus induction too
@elirhm5926 Жыл бұрын
the best explaination ever! thank you so much!
@daisy_haniii Жыл бұрын
Thank you! Great Explanation
@piyushkumar-wg8cv Жыл бұрын
Clean and crisp explanation. Thanks.
@___mikechecking Жыл бұрын
nice explanation
@harikrushnasuhagiya39252 жыл бұрын
Well done!!
@ryderman53292 жыл бұрын
sir great videos, can't wait for hashing
@algorithmsbysharmathankach75212 жыл бұрын
Will do
@priyavratmisra2 жыл бұрын
@@algorithmsbysharmathankach7521 Thank you.
@remuslupin20642 жыл бұрын
Thank you very much sir! I had stuck to this algorithm for a whole day! I couldn't understand the presentation of CLRS, seemed too weird and the wikipedia page for this algorithm sucks :/ You are a life saver :)
@illyushen98562 жыл бұрын
this is underrated! the only video by which i could understand the 7 points saga!! thanks a ton!