Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #Author Diego Vannelli
  2. def check(s,t,n):
  3. # @Param s: string
  4. # @Param c: string
  5. # @Param n: n
  6. if n<=0:
  7. return true
  8. if len(s)<=0 and n>=0:
  9. return false
  10. elif len(s)>=0 and n>=0:
  11. if s[0]==t:
  12. return check(s[1:],t,n-1)
  13. else:
  14. return check(s[1:],t,n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement