VDVivian D'souzaindszvivian.hashnode.dev·Feb 5, 2022 · 2 min readBinary Search AlgorithmProcedure Array should be a sorted array. Find the middle element if the target is greater than the middle element -> search in the right else -> search in the left (In an Ascending sorted array) if middle element is equal to target element -> answe...00
VDVivian D'souzaindszvivian.hashnode.dev·Feb 4, 2022 · 2 min readLinear Search AlgorithmIntroduction Linear Search Algorithm: Start searching the element from the first element till you get the element you are looking for. Time Complexity : Best case: Element is found in the first place. Worst case: Element is not found at all(loop has...00