Algorithms and data structures for JS/TS
  • Introduction
  • GETTING STARTED
    • TS
    • Node.js
    • ES Modules
    • Browsers
  • PUBLIC API
    • How to read
    • Linked lists
      • SinglyLinkedList
      • DoublyLinkedList
      • CircularlyLinkedList
    • Stacks and queues
      • LinkedStack
      • LinkedQueue
      • LinkedDeque
      • CircularQueue
      • CircularArrayBuffer
      • UnsortedPriorityQueue
      • SortedPriorityQueue
      • AdaptableHeapPriorityQueue
    • Maps
      • SortedMap
      • MaximaSet
      • AVLTreeMap
      • SplayTreeMap
      • RedBlackTreeMap
    • Trees
      • GeneralTree
      • LinkedBinaryTree
      • PreorderTreeTraversal
      • InorderTreeTraversal
      • PostorderTreeTraversal
      • EulerTourTreeTraversal
    • Searches
      • Binary search
      • Quick select
    • Text processing
      • Longest common subsequence
      • Boyer-Moore
      • Knuth-Morris-Pratt
    • Position
    • Locator
    • Comparators
  • CONTRIBUTION NOTES
    • How to contribute
    • Project structure
  • Changelog
Powered by GitBook
On this page

Was this helpful?

  1. PUBLIC API
  2. Maps

RedBlackTreeMap

PreviousSplayTreeMapNextTrees

Last updated 5 years ago

Was this helpful?

new RedBlackTreeMap()

/**
 * Creates an instance of RedBlackTreeMap.
 *
 * @param iterable Iterable of pairs to create the new map with.
 * @param compare Comparison function for key-value pairs sorting by key. Keys are compared as strings by default.
 */
constructor(iterable: Iterable<[K, V]> = [], compare: CompareFunc<K> = compareAsStrings)

Other properties and methods of this class are fully compatible with:

SortedMap