What is Binary Search , What Binary Search Do , Where we use Practically Binary Search ,Formula or Binary Search, Is binary Search is a Searing Algoright to find Element , what the Time Complexity of this Algoright , Constrant on Binary Search , we can Apply the Binary Search only In Shorted array if you array is Not Shorted then make it Shored then you only Apply on Binary Search Other wise .... , how Our Binary Search Work so when ever we do a Binary seach we try to find middle element of the Array how do we find the middle elemtent by taking the Two Poiter the First Pointer in at 0 index and second pointer is in last index do how we find the Middle we find the middle by doing middle = (left + right) / 2 then take one Example , .. this return the Middle index so now whats we do once we find the Middle Elemet we will check if my middle Element is Equal to Target , then now we check if my middle is Greater then or Less that Target array , - 1 , 0 , 3 , 5,9,12 , target = 9 , here we got 3 that meanse our Target lies on this space 3 , 5,9,12 we ignore the left part , so if the next iteration what we will go if my we will make we will shift left 5 as a left pointer as we will keep the Rigth Pointer as it is we will shift our left pointer Left mecome middle + 1 and right as it is now we will again find the Middle value how we will find the Middle value m = (l+r) / 2 -- . 3 + 5 /2 = 4 is our middle , so once we find the middle element we check is my middle element is Equal to target if yes then we will returun middle , sydo code for this , 3 case of Binary Search , targer grater then middle , smaller that middle and Equal to Middle , write Example code in js , c and java , Approch to Inplement Binary Search any Where , compare linear Search also to Binary search and also Write why Binary search is More Optisice from Linar Searc , Resuracive Code of Binary Search , give real World Example Of disnary , compare the Time Complexity of Binary Search and Linear Search , Condisation to Apply Binary Search , what aproritm we use to Short array all the Name of That Algorithm , so When to Update first and last Pointer
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)