Could someone explain the following question -
Given the following statement viz. Consider an input array a[1..n] of arbitrary numbers. It is given that the array has only O(1) distinct elements. What does the statement imply ?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
Essentially, it means no matter what the size of the array is (namely, no matter what $n$ is), it will have no more than a fixed constant number of distinct elements. This assumes that you know what the term $O(1)$ means. If not, ask for clarification.