Skip to content

Instantly share code, notes, and snippets.

laoyuan

Block or report user

Report or block laoyuan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d3daa37e58cadc24ae30
class Solution(object):
def strStr(self, source, target):
if source == None or target == None:
return -1
len_t = len(target)
if len_t == 0:
return 0
pos_s = 0
for char_s in source[:-len_t]:
pos_t = 0
You can’t perform that action at this time.