Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Multiset with Min and Max

Maintain a multiset. Operations: add x, remove x (removes one copy if present), count x, min, max. min and max print EMPTY when the multiset is empty.

Constraints

1 <= q <= 10^5

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.