diff options
| author | mzuenni <michi.zuendorf@gmail.com> | 2023-03-28 13:25:59 +0200 |
|---|---|---|
| committer | mzuenni <michi.zuendorf@gmail.com> | 2023-03-28 13:25:59 +0200 |
| commit | fe5fa1141efeb7454c763dbd2645fb4ff04487a3 (patch) | |
| tree | f2197bb94ce80ab2fae886177dfa9b0bd11538ac /datastructures/stlPQ.cpp | |
| parent | 3b91d2662310aee532cc84e1447824459671767e (diff) | |
merged
Diffstat (limited to 'datastructures/stlPQ.cpp')
| -rw-r--r-- | datastructures/stlPQ.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/datastructures/stlPQ.cpp b/datastructures/stlPQ.cpp index b48223b..4e439f8 100644 --- a/datastructures/stlPQ.cpp +++ b/datastructures/stlPQ.cpp @@ -5,11 +5,11 @@ using priorityQueue = __gnu_pbds::priority_queue<T, less<T>>; int main() { priorityQueue<int> pq; - auto it = pq.push(5); // O(1) + auto it = pq.push(5); // O(1) pq.push(7); - pq.pop(); // O(log n) amortisiert - pq.modify(it, 6); // O(log n) amortisiert - pq.erase(it); // O(log n) amortisiert + pq.pop(); // O(log n) amortisiert + pq.modify(it, 6); // O(log n) amortisiert + pq.erase(it); // O(log n) amortisiert priorityQueue<int> pq2; - pq.join(pq2); // O(1) + pq.join(pq2); // O(1) } |
