For example the following code produces the order Stock1, Stock2, Stock3
var tm = TreeMap("Stock1" -> 4.2, "Stock3" -> 3.7, "Stock2" -> 5.9)
What I’m looking for is a collection or technique that can produce the following
Stock2, Stock1, Stock3 which represents the prices in descending order
Revert sorted1, to get it descending, or sortWith:
Version 4, sort by -x (minus x):