Disjoint-set data structure
An interesting problem, given some numbers, group them into individual sets based on certain rules. For example, for numbers between, we group them into sets (0, 0), [1, 5), [10, 30), [30, 60), [60, 100]. I found this article on topcode is very helpful. Below is an implementation in C++.