Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Feb 20th, 2018
62
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
def search(v,a)
return if a.empty?
if a.pop == v
return search(v,a) + 1 rescue 1
else
return search(v,a) + 0 rescue 0
end
end
search(1,[1,2,3,4,3,4,4,4,1,1,4])
Add Comment
Please,
Sign In
to add comment
Public Pastes
K_C_Shuffle
C# | 11 min ago | 1.12 KB
pagination-fixed
JavaScript | 22 min ago | 4.75 KB
🤑 G2A.com Free Gift Card Guide May 2024 FIX 🤑
GetText | 34 min ago | 0.39 KB
Untitled
C# | 57 min ago | 4.54 KB
Untitled
TypeScript | 1 hour ago | 2.13 KB
:/
JavaScript | 1 hour ago | 5.22 KB
Untitled
Java | 2 hours ago | 1.72 KB
Splah Layout
XML | 3 hours ago | 0.31 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!