Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
3
def
per(list1,list2):
4
list1.sort()
5
list2.sort()
6
if
list1==list2:
7
return
"permutation"
8
return
"not"
9
10
print(per([1,2,3,5],[5,2,1,3]))
11
print(per([
'a'
,
'c'
,
'e'
,
'd'
],[
'd'
,
'c'
,
'a'
,
'e'
]))
Callers
1
permutation.py
File · 0.85
Calls
1
sort
Method · 0.45
Tested by
no test coverage detected