Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

References

https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-map/index.html#kotlin.collections.Map

  1. LinkedHashMap preserves the insertion order (which is similar to dict in Python 3.7+).

{-1=zz, 1=x, 2=y}
null

LinkedHashMap

Notice that the order of keys is the same as their insertion order!

{1=x, 2=y, -1=zz}
1 = x
2 = y
-1 = zz
1 = x
2 = y
-1 = zz
[x, y, zz]

Count Occurences of Elements in a Collection

Loading...