We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48b91b3 commit 2143db1Copy full SHA for 2143db1
7/3.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
while (start <= end) {
8
int mid = (start + end) / 2;
9
// 찾은 경우 중간점 인덱스 반환
0 commit comments