diff --git a/AK/RedBlackTree.h b/AK/RedBlackTree.h index dbfebbad272..b02c97952ca 100644 --- a/AK/RedBlackTree.h +++ b/AK/RedBlackTree.h @@ -464,6 +464,12 @@ public: ConstIterator end() const { return {}; } ConstIterator begin_from(K key) const { return ConstIterator(static_cast(BaseTree::find(this->m_root, key))); } + ConstIterator find_largest_not_above_iterator(K key) const + { + auto node = static_cast(BaseTree::find_largest_not_above(this->m_root, key)); + return ConstIterator(node, static_cast(BaseTree::predecessor(node))); + } + V unsafe_remove(K key) { auto* node = BaseTree::find(this->m_root, key);