Files
SolutionEuler/solutions/0024.Permutations/README.md
Sidney Zhang accc74ff43 feat(solutions):新增排列问题解决方案和斐波那契问题优化
📝 docs(solutions):添加排列问题README文档说明欧拉数算法
♻️ refactor(solutions):重构排列问题代码,添加数学计算方法
 feat(solutions):新增斐波那契问题解决方案,支持大数计算和Binet公式
🔧 chore(solutions):为两个解决方案添加性能计时器装饰器
2025-12-24 14:51:57 +08:00

15 lines
679 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 有序排列
我没想到的是,排列也有很多事情是我没想到的,比如 [欧拉数 Eulerian Number](https://en.wikipedia.org/wiki/Eulerian_number)。
在 [OEIS A008292](https://oeis.org/A008292) 还有更多讨论。
本来以为使用python自带的排列方法就是最快的了。但没想到欧拉数的有序计算逻辑似乎更好用
对于 $n$ 个元素的排列:
- 总共有 $n!$ 种排列
- 以某个特定元素开头的排列有 $(n1)!$ 种
- 这构成了变进制的基础,可以用来计算第 $k$ 个排列。
相比在序列上移动要快速多了,毕竟是与原序列的长度相关,而不与位置相关。