如何映射几个字符串c sharp的列表 [英] how to map several lists of string c sharp

查看:69
本文介绍了如何映射几个字符串c sharp的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请问如何使用多个字符串列表映射现有字符串列表,并获取c sharp中的地图数量最多的字符串。谢谢

pls how can i map an existing list of string with several lists of string and get the one with the highest number of maps in c sharp.thanks

推荐答案

问题没有正确制定。



其中一个原因是:只需要一个列表产生最大数量的地图(得到一个),但是多个列表可能存在这样的属性:该集合中的每个列表将产生相同数量的映射;和所有其他列表生成具有较小基数的地图。换句话说,可以找到最大值本身,但是这个最大值可以在多个点上达到。



顺便说一句,因为没有要求(约束)不是强加在要计算的地图上,地图的数量只是参与映射的两个列表中的元素数量的一些函数。从这个意义上说,配方字符串列表是完全多余的。



我可以想象最初的想法是只选择具有某些属性的映射(例如,当在一个列表中的图像和另一个列表中的函数是相同的字符串时),但由于配方中的显着邋iness,这种情况丢失,留下一些冗余的单词,这意味着没有必要。


换句话说,这个问题根本不是问题,而是一堆麻烦的单词。虽然这些词可能被用来进行一些想法,这可能是一个或多或少有趣的学校编程问题的基础,但由于不确定和一般文盲的措辞,这个目标完全被遗漏。正如人们在这种情况下所说:你知道一些聪明的话,但不知道把它们放在一起。无论如何,这个问题不值得认真考虑,因为甚至在文本被认为是问题之前就出现了错误。 :-)



-SA
The problem is not formulated correctly.

One of the reasons is this: only one list producing the maximum number of maps is required ("get the one"), but more then one list may exist with such a property: every list in this set will produce the same number of maps; and all other lists produce maps with lesser cardinality. In other words, a maximum itself can be found, but this maximum is reached in more than one point.

By the way, as no requirements (constraints) are not imposed on the maps to be calculated, the number of maps is simply some function of numbers of elements in the both lists participated in mapping. In this sense, the formulation "list of string" is completely redundant.

I can imagine that original idea was to select only the mappings with certain properties (for example, when in image in one list and the function in another one are identical strings), but due to remarkable sloppiness in the formulation this condition was lost, leaving some redundant words which mean nothing essential.

In other words, the problem is not a problem at all, but a sloppy set of cumbersome words. While these words may be used to conduct some idea which could be a base of more or less interesting school problem on programming, this goal was totally missed due to uncertain and generally illiterate wording. As folks say in such cases: "you know some clever words, but don''t know put them together". Anyway, the problem does not worth serious consideration, as the bugs appeared even before the text could be considered as the problem. :-)

—SA


这篇关于如何映射几个字符串c sharp的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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