Binary Search Algorithm in C#

  Рет қаралды 7,243

Milan Jovanović

Milan Jovanović

Күн бұрын

Пікірлер: 52
@MilanJovanovicTech
@MilanJovanovicTech 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
@AslamNazeerShaikh
@AslamNazeerShaikh 2 ай бұрын
Please make full DSA series in c# ❤🎉
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Maybe, maybe
@MohammedMufish_Shaikh
@MohammedMufish_Shaikh 2 ай бұрын
​@@MilanJovanovicTech please say might be
@17Kalash
@17Kalash 2 ай бұрын
@@MilanJovanovicTechit will be a blessing a DSA Course in C# by you ✨🙏🏼
@genadyshmunik6041
@genadyshmunik6041 Ай бұрын
@@MilanJovanovicTechdeep and extensive, I will buy one for sure!
@GiorgiChikovani_FromGeorgia
@GiorgiChikovani_FromGeorgia Ай бұрын
@@MilanJovanovicTech +1 Let's do it
@lalithmahadev5027
@lalithmahadev5027 2 ай бұрын
So,you basically binary searched to the chapter of the book where you have contributed.Nicely done Milan!!!
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
I was the Tech editor 😅 But the writing is all Dino.
@fredericmerouze4876
@fredericmerouze4876 Ай бұрын
great video milan :) ! it's possible to have more content about Algorithm (binary tree etc) ?
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Yes, definitely
@nouchance
@nouchance 2 ай бұрын
Thank you MILAN!
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Sure thing :)
@meharshahbaz2715
@meharshahbaz2715 2 ай бұрын
Very conceptual video
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Thanks!
@10Totti
@10Totti 2 ай бұрын
Dino Esposito and Francesco Balena top software developer!!!!
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Great guys!
@glickyaron9490
@glickyaron9490 2 ай бұрын
great video. If it is possible to store the data in hash table. it will give a search complexity of O(1).
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Yes, it's possible
@orestpavlenko565
@orestpavlenko565 2 ай бұрын
Did you install some extension colors for intellisense or it could be setup in Visual Studio?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
ReSharper
@r75shell
@r75shell Ай бұрын
Have you really tried to benchmark recursive version? Because if C# has tail-recursion optimization, it should produce same code as while loop implementation.
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Haven't tried the recursive approach
@CLeovison
@CLeovison 2 ай бұрын
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
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Noted!
@dhruvmathur5315
@dhruvmathur5315 2 ай бұрын
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 ?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Noted
@ЛюбомирГеоргиев-о5й
@ЛюбомирГеоргиев-о5й 2 ай бұрын
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
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
@@ЛюбомирГеоргиев-о5й mentioned it in the benchmark part
@usEr-oCt-76
@usEr-oCt-76 Ай бұрын
But sorting is also part of the search which saves the time of the actual search.
@MilanJovanovicTech
@MilanJovanovicTech Ай бұрын
Sort while inserting
@krccmsitp2884
@krccmsitp2884 2 ай бұрын
I would've guessed that the compiler is clever enough to optimize / 2 to >> 1. Apparently it wasn't.
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Explanation: x.com/andersforsgren/status/1827796305944416568
@michaldivismusic
@michaldivismusic Ай бұрын
I'm guessing bit shift operations are scary for some people which might by why the compiler doesn't suggest this.
@enricoroselino7557
@enricoroselino7557 2 ай бұрын
yessss DSA
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Should I do more?
@enricoroselino7557
@enricoroselino7557 2 ай бұрын
@@MilanJovanovicTech yesss bring back the nightmare on BFS DFS or somesort, promise will takcle em this time 😂
@sunzhang-d9v
@sunzhang-d9v 2 ай бұрын
arr.for what is tool?
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
What?
@henrik3098
@henrik3098 2 ай бұрын
nice :)
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Thanks!
@onaspnet
@onaspnet 2 ай бұрын
Your video thumbnail has a bug ... mid point is wrong ....
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Oh no
@shoooozzzz
@shoooozzzz 2 ай бұрын
YAAC (Yet another algo channel)
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Is that a term? First time I see it
@fabaladibbasey7453
@fabaladibbasey7453 2 ай бұрын
way to DSA
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
Thank you 💪
@haroldpepete
@haroldpepete 2 ай бұрын
12:17 45 is greater than 40
@MilanJovanovicTech
@MilanJovanovicTech 2 ай бұрын
It is
Master This Skill To Become a Better Software Engineer
17:20
Milan Jovanović
Рет қаралды 21 М.
Binary Search Algorithm - Computerphile
18:34
Computerphile
Рет қаралды 163 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 51 МЛН
Exceptions Are Extremely Expensive… Do This Instead
17:15
Milan Jovanović
Рет қаралды 47 М.
Are You Accidentally Crippling Your EF Core Queries?
17:18
Milan Jovanović
Рет қаралды 30 М.
I Built a Neural Network in C# From Scratch. Here’s What I Learned…
18:12
Completely Get Rid of Exceptions Using This Technique
19:24
Milan Jovanović
Рет қаралды 26 М.
Stop Using FirstOrDefault in .NET! | Code Cop #021
12:54
Nick Chapsas
Рет қаралды 94 М.
100K Subscribers Special: My Journey, Career Advice, Future of .NET
16:36
Stop using std::vector wrong
23:14
The Cherno
Рет қаралды 149 М.
A Natural Path to Domain-Driven Design (evolve your code)
26:05
Milan Jovanović
Рет қаралды 15 М.
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 51 МЛН