Showing posts with the label AlgorithmsShow all

class Solution : def BinarySearch ( self , Li , terget ) : left = 0 right = len ( Li ) - 1 print ( f'total-number-> { right } ' ) while left <= right : mid = left + (r…

Linear Search | part - 1

class Solution : def LinearSearch ( self , Li , terget ) : length = len ( Li ) for i in range (length) : if Li [i] == terget : return i return "Sorry targets is not fou…