Created
April 22, 2022 11:42
-
-
Save alexdremov/62e887409a4693f22b89070ddaeea91b to your computer and use it in GitHub Desktop.
Treap Alex Dremov implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
struct Node { | |
T key; | |
size_t prior; | |
Node* left = nullptr, *right = nullptr; | |
Node(T key, size_t prior) : | |
key(std::move(key)), | |
prior(prior) { | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment