Closed koseoyoung closed 5 years ago
Yes, if you are using the same key, you will not be able to store a separate value. But what if you swap your key and your value? You could then maintain sorting by value without worrying about duplicates.
Let me know if this answers your question - if it does, feel free to close this issue.
Yes I got it !! Thank you !!
Hi, I have a question about storing the information of transactions! (especially about data structure)
After using knapsack algorithm, we should store the transactions to be sorted by fee. But when we use Treemap data structure, if there is same transaction fee, it may cause a problem. How can we store whole information with Treemap with duplicate?
Thank you!