You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 0704-Binary_Search/readme.md
+2
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,5 @@
1
+
# 704. Binary Search
2
+
1
3
Given an array of integers `nums` which is sorted in ascending order, and an integer `target`, write a function to search `target` in `nums`. If `target` exists, then return its index. Otherwise, return `-1`.
2
4
3
5
You must write an algorithm with `O(log n)` runtime complexity.
0 commit comments