Number of distinct elements in a given range


This is a companion discussion topic for the original entry at http://iq.opengenus.org/number-of-distinct-elements-in-given-range/