Advertisement
DecaK

Untitled

May 7th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. def is_comb(l1, l2):
  2.     b = len(l1)
  3.     if b != len(l2): return False;
  4.     if not b: return True;
  5.     if l1[0] in l2:
  6.         l2.remove(l1[0])
  7.         return is_comb(l1[1:], l2);
  8.     return False
  9.  
  10. def find_it(S, T):
  11.     return any(is_comb(T, i) for i in S);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement