帮助在 C# 中找到快速排列/组合算法
我一直在使用在 CodeProject 找到的算法,只要我希望每个排列的长度与我用来生成排列的字符数相同(例如“code”将产生“code”,“coed”,“cdoe”等)
我想做的是扩展找到一个算法,无论长度如何,它都会给我所有的排列/组合(例如“code”将产生“c”,“co”,“cod”,“code”,“coe”,“coed”等)
我使用的术语正确吗?任何帮助将不胜感激。谢谢
I've been using the algorithm found here at CodeProject which has worked well provided I want the length of each permutation to be the same as the number of characters I used to generate the permutations (e.g. "code" would yield "code", "coed", "cdoe", etc)
What I want to do is expand on that to find an algorithm that would give me all the permutations/combinations regardless of length (e.g. "code" would yield "c", "co", "cod", "code", "coe", "coed", etc)
Am I using the correct terminology? Any help would be greatly appreciated. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论