C#中没有重复的变体 [英] Variations without Repetition in C#

查看:97
本文介绍了C#中没有重复的变体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一组数字
不知道里面有多少个

例如:

在[1,2,3,4]列表中

我想把结果:

1,2
1,3
1,4
2,3
2,4
3,4
1,2,3
1,2,4
2,3,4

我想在本文中回答,而本文中没有详细解释的意义是另一篇文章.

I have a set of numbers
Is not known how many number inside

For Example:

in the list [1,2,3,4]

i want out put the result:

1,2
1,3
1,4
2,3
2,4
3,4
1,2,3
1,2,4
2,3,4

I want to answer in this article and another article is not in the sense explained in detail here in this article.

推荐答案

本文应做您想要的事情:使用C#泛型的排列,组合和变体 [
This article should do what you want: Permutations, Combinations, and Variations using C# Generics[^]

If you have already found it, then it looks pretty simple to me: perhaps you need to read it a bit more closely.


这篇关于C#中没有重复的变体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆