removed info block, added Benq to authors lol

This commit is contained in:
Michael Cao 2020-06-28 16:13:57 -05:00
parent da2cd16baf
commit 7b70216ac6

View file

@ -1,7 +1,7 @@
---
id: merging
title: "Small-To-Large Merging"
author: Michael Cao
author: Michael Cao, Benjamin Qi
prerequisites:
- Silver - Depth First Search
- Gold - Point Update Range Sum
@ -110,14 +110,6 @@ int main() {
A set doesn't have to be an `std::set`. Many data structures can be merged, such as `std::map` or `std:unordered_map`. However, `std::swap` doesn't necessarily work in $O(1)$ time; for example, swapping two [arrays](http://www.cplusplus.com/reference/array/array/swap/) takes time linear in the sum of the sizes of the arrays, and the same goes for indexed sets. For two indexed sets `a` and `b` we can use `a.swap(b)` in place of `swap(a,b)` (documentation?).
<info-block title="Challenge">
Prove that if you instead merge sets that have size equal to the depths of the subtrees, then small to large merging does $O(N)$ insert calls.
(be specific about what this means?)
</info-block>
## Problems
<problems-list problems={metadata.problems.general} />
@ -184,4 +176,4 @@ It's easy to merge two sets of sizes $n\ge m$ in $O(n+m)$ or $(m\log n)$ time, b
Requires knowledge of BSTs such as treaps or splay trees.
<problems-list problems={metadata.problems.treeRot} />
<problems-list problems={metadata.problems.treeRot} />