Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Author Diego Vannelli
- def check(s,t,n):
- # @Param s: string
- # @Param c: string
- # @Param n: n
- if n<=0:
- return true
- if len(s)<=0 and n>=0:
- return false
- elif len(s)>=0 and n>=0:
- if s[0]==t:
- return check(s[1:],t,n-1)
- else:
- return check(s[1:],t,n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement