最近在看Cracking the coding interview
有一個c++習題版本的,位址位址如下:位址
本人一邊看一邊嘗試着用python寫一下
def is_unique(string):
s = ''
for c in string:
if s.find(c) != -1:
return 0
else:
s += c
return 1
python新手,先練練手