ericgmconrado
BAN USER
Comments (4)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
def rotate(a, k):
return [ a[(i-k)%len(a)] for i in range(len(a))]
Comment hidden because of low score. Click to expand.
0
of 0 vote
Python, really nice and simple for ya =)
- ericgmconrado March 30, 2013Comment hidden because of low score. Click to expand.
0
of 0 vote
def is_palindrome(string):
if not string:
return false
black_list = [",", ".", ":", " ", ";"]
for c in black_list:
string = "".join(string.split(c))
string = string.lower()
return string==string[::-1]
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
All done in a single line with python ^^
- ericgmconrado March 31, 2013