We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5429453 commit 48b91b3Copy full SHA for 48b91b3
7/2.cpp
@@ -3,7 +3,7 @@
3
using namespace std;
4
5
// 이진 탐색 소스코드 구현(재귀 함수)
6
-int binarySearch(vector<int> arr, int target, int start, int end) {
+int binarySearch(vector<int>& arr, int target, int start, int end) {
7
if (start > end) return -1;
8
int mid = (start + end) / 2;
9
// 찾은 경우 중간점 인덱스 반환
0 commit comments