Skip to content
#

red-black-tree

Here are 199 public repositories matching this topic...

danielchang-Z
danielchang-Z commented Sep 30, 2018

A pleasure that LinkedHashMap has been added.

While I have a different point about the iterative sequence. The sequence should order by the key last time put in instead of the first time put in.

This situation is caused by the func named LinkedHashMap.Put:

// Put inserts key-value pair into the map.
// Key should adhere to the comparator's type assertion, otherwise method panics.
fu
dotnwat
dotnwat commented Mar 21, 2018

The key/value pairs for each item in the tree are stored in their own struct entry and shared structurally with other tree nodes. When the actual key/value is small, we don't gain a lot from this sharing. A performance enhancement is to embed the key/value pairs in the tree nodes when they are small enough. This makes sense for numeric types, but maybe others as well.

Improve this page

Add a description, image, and links to the red-black-tree topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the red-black-tree topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.