Created
March 4, 2018 13:52
-
-
Save xiazhibin/5650acd8d00ba355df00e072362c3235 to your computer and use it in GitHub Desktop.
排列
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def ngetmprint(list, ans, m): | |
| if m == len(list): | |
| ans = ans + list | |
| print ans | |
| elif m == 0: | |
| print ans | |
| else: | |
| ngetmprint(list[1:], ans + list[0:1], m - 1) | |
| ngetmprint(list[1:], ans, m) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment