Skip to content

Instantly share code, notes, and snippets.

@alexdremov
Created April 22, 2022 11:42
Show Gist options
  • Save alexdremov/62e887409a4693f22b89070ddaeea91b to your computer and use it in GitHub Desktop.
Save alexdremov/62e887409a4693f22b89070ddaeea91b to your computer and use it in GitHub Desktop.
Treap Alex Dremov implementation
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