MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / per

Function per

Python/permutation.py:3–8  ·  view source on GitHub ↗
(list1,list2)

Source from the content-addressed store, hash-verified

1# permutation
2
3def per(list1,list2):
4 list1.sort()
5 list2.sort()
6 if list1==list2:
7 return "permutation"
8 return "not"
9
10print(per([1,2,3,5],[5,2,1,3]))
11print(per(['a','c','e','d'],['d','c','a','e']))

Callers 1

permutation.pyFile · 0.85

Calls 1

sortMethod · 0.45

Tested by

no test coverage detected