Re: On the complexity of determining whether n numbers are distinct
- From: "eKo1" <berndlosert@xxxxxxxxxxxx>
- Date: 24 Sep 2006 14:10:16 -0700
Markus Triska wrote:
Maintain a bit-vector, initially set to 0. For each number n, check
whether n-th bit is set (if yes => non-distinct). Otherwise, set n-th
bit and continue. Requires no comparison between any of the numbers.
I'm not following you at all. Could you provide an example?
.
- Follow-Ups:
- Re: On the complexity of determining whether n numbers are distinct
- From: Markus Triska
- Re: On the complexity of determining whether n numbers are distinct
- References:
- Prev by Date: Re: On the complexity of determining whether n numbers are distinct
- Next by Date: Re: An algorithm with Minimum vertex cover without considering its performance
- Previous by thread: Re: On the complexity of determining whether n numbers are distinct
- Next by thread: Re: On the complexity of determining whether n numbers are distinct
- Index(es):