From ac5aeeb914d33dcf9d73eca2cf696b46fc68ea3c Mon Sep 17 00:00:00 2001 From: SAM <73647831+samhackathon@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:17:27 +0500 Subject: [PATCH] Delete Binary.cpp --- Binary.cpp | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 Binary.cpp diff --git a/Binary.cpp b/Binary.cpp deleted file mode 100644 index 0bbb175ab49..00000000000 --- a/Binary.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// Returns location of key, or -1 if not found -int BinarySearch(int A[], int l, int r, int key){ - int m; - while( l <= r ){ - m = l + (r-l)/2; - - if( A[m] == key ) // first comparison - return m; - - if( A[m] < key ) // second comparison - l = m + 1; - else - r = m - 1; - } - return -1; -} -// THIS CODE IS CONTRIBUTED BY YASH AGARWAL(YASHAGARWAL2852002)