Luzhiled's Library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub ei1333/library

:heavy_check_mark: Persistent-Leftist-Heap
(structure/heap/persistent-leftist-heap.hpp)

Verified with

Code

/**
 * @brief Persistent-Leftist-Heap
 */
template< typename T, bool isMin = true >
struct PersistentLeftistHeap : LeftistHeap< T, isMin > {
  using Node = typename LeftistHeap< T, isMin >::Node;

  Node *clone(Node *t) override {
    return new Node(*t);
  }
};
#line 1 "structure/heap/persistent-leftist-heap.hpp"
/**
 * @brief Persistent-Leftist-Heap
 */
template< typename T, bool isMin = true >
struct PersistentLeftistHeap : LeftistHeap< T, isMin > {
  using Node = typename LeftistHeap< T, isMin >::Node;

  Node *clone(Node *t) override {
    return new Node(*t);
  }
};
Back to top page