Collection – give me a multifunctional practical use case

I want to know some actual use cases (it would be better if they had no association / binding with any programming language) I can associate sets, lists, and maps with actual use cases

For example, if you want a glossary of a book, the terms you want are listed alphabetically, and the location / page number is the value, you can use the set treemap (orderedmap is a map)

Somehow, I can't associate multisets with any "practical" use cases Does anyone know what's the use?

http://en.wikipedia.org/wiki/Multiset Didn't tell me enough:)

PS: if you think this should be a community wiki, it doesn't matter The only reason I didn't do it was "there is a clear and objective way to answer this question"

Solution

Many applications, for example, imagine a shopping cart This can include instances of multiple projects – 2 CPUs, 3 graphics cards, etc Therefore, it is a multi - set A simple implementation is to track the number of items per item - that is, keep information, 2 CPUs, 3 graphics cards, etc

I'm sure you can think of many other applications

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>