Treap (Cartesian Tree)
0 comments
- Points36
- Comments5
0 comments
Story details from Hacker News ↗ · linked article on cp-algorithms.com.
Treap (Cartesian Tree) was first seen by Trendoday on Oct 29, 2026. Since then it has appeared in 35 checks on 1 different day. It reached #20 on Hacker News · Front page on Oct 29, 2026 UTC. It was last seen on Hacker News · Front page on Oct 29, 13:37 UTC.
Best recorded rank on Hacker News · Front page per UTC day.
Best rank per day (UTC).
A few top-level comments from Hacker News, shortened. Read the full thread on Hacker News.
> Maintaining the sizes of subtrees Something that's not mentioned in that article is that you can maintain any monoid efficiently over balanced trees, not just the subtree size (aka you need an identity element and an associative operation). Most widely known monoids are boring, but there are more interesting…
The primary attraction of treaps (aside from fast intersection/union/diff) is that they are probably one of the easiest types of balanced trees that can be implemented manually if you need a dependency-free balanced tree. There are only two types of rotations, they are straightforward, and they are mirror images of…
A very nice problem solved using treap: https://stackoverflow.com/questions/79751600/solve-cses-moun...
Archived daily, weekly and monthly lists that include this entry.
Not at the moment. Its last recorded appearance was on Oct 29, 13:37 UTC.
#20 on Oct 29, 2026 UTC.
It was first seen on Oct 29, 2026 and has been on the list on 1 day (35 checks) since.
36 points and 5 comments; submitted by vismit2000 on Oct 26, 2026.