Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Cautare binara
AlexandruT
Jan 21st, 2015
67
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C++
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
int
CautBin
(
int
st,
int
dr,
int
x
)
{
while
(
st
<=
dr
)
{
m
=
(
st
+
dr
)
/
2
;
if
(
a
[
m
]
==
x
)
return
m
;
else
if
(
a
[
m
]
<
x
)
st
=
m
+
1
;
else
dr
=
m
-
1
;
}
return
-
1
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
💎 ChangeNOW Exploit 📌✅
JavaScript | 1 min ago | 0.20 KB
💎 ChangeNOW Exploit 📌✅
JavaScript | 1 min ago | 0.20 KB
💡 EASY MONEY GUIDE ✅ Working ✅📌
JavaScript | 13 min ago | 0.20 KB
💎 ChangeNOW Exploit
JavaScript | 16 min ago | 0.22 KB
Untitled
PHP | 34 min ago | 31.29 KB
🔥 Exchange profit method
JavaScript | 39 min ago | 0.22 KB
Valid Anagrams - LeetCode
Java | 56 min ago | 3.13 KB
InfiniteReboot
Lua | 1 hour ago | 1.41 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!