Get the source code for this video for FREE → the-dotnet-weekly.ck.page/binary-search Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSth
Have you really tried to benchmark recursive version? Because if C# has tail-recursion optimization, it should produce same code as while loop implementation.
Hey Milan, awesome stuff as always, can you please make a video on Durable functions please, I saw your video on azure functions and I think that's the next step no ?
Hi Milan, you have a bug in the Binary search code. This bug is very sneaky and widely speeded. Imagine input collection is with 2_000_000 elements and you are looking for the last element (or in upper part). When you sum left and right boundary the mid will overflow. There is very simple workaround using (right - left boundary) /2
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/binary-search
Want to master Clean Architecture? Go here: bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSth
Please make full DSA series in c# ❤🎉
Maybe, maybe
@@MilanJovanovicTech please say might be
@@MilanJovanovicTechit will be a blessing a DSA Course in C# by you ✨🙏🏼
@@MilanJovanovicTechdeep and extensive, I will buy one for sure!
@@MilanJovanovicTech +1 Let's do it
So,you basically binary searched to the chapter of the book where you have contributed.Nicely done Milan!!!
I was the Tech editor 😅 But the writing is all Dino.
great video milan :) ! it's possible to have more content about Algorithm (binary tree etc) ?
Yes, definitely
Thank you MILAN!
Sure thing :)
Have you really tried to benchmark recursive version? Because if C# has tail-recursion optimization, it should produce same code as while loop implementation.
Haven't tried the recursive approach
12:17 45 is greater than 40
It is
Very conceptual video
Thanks!
Did you install some extension colors for intellisense or it could be setup in Visual Studio?
ReSharper
Hi Milan,
I hope that you will release a video on how start making an minimal api in the future.
Thank you thank you so much
Noted!
great video. If it is possible to store the data in hash table. it will give a search complexity of O(1).
Yes, it's possible
is it an assumption when using binary search the numbers are in order? can it be used for objects?
Yes, the array has to be sorted
Hey Milan, awesome stuff as always, can you please make a video on Durable functions please, I saw your video on azure functions and I think that's the next step no ?
Noted
Dino Esposito and Francesco Balena top software developer!!!!
Great guys!
Hi Milan, you have a bug in the Binary search code. This bug is very sneaky and widely speeded. Imagine input collection is with 2_000_000 elements and you are looking for the last element (or in upper part). When you sum left and right boundary the mid will overflow. There is very simple workaround using (right - left boundary) /2
@@ЛюбомирГеоргиев-о5й mentioned it in the benchmark part
But sorting is also part of the search which saves the time of the actual search.
Sort while inserting
yessss DSA
Should I do more?
@@MilanJovanovicTech yesss bring back the nightmare on BFS DFS or somesort, promise will takcle em this time 😂
I would've guessed that the compiler is clever enough to optimize / 2 to >> 1. Apparently it wasn't.
Explanation: x.com/andersforsgren/status/1827796305944416568
I'm guessing bit shift operations are scary for some people which might by why the compiler doesn't suggest this.
arr.for what is tool?
What?
Your video thumbnail has a bug ... mid point is wrong ....
Oh no
nice :)
Thanks!
YAAC (Yet another algo channel)
Is that a term? First time I see it
way to DSA
Thank you 💪