Questions tagged [distinct-values]

Use this tag for questions related to Distinct Values, i.e. values that are distinct/unique from the values in a collection.

632 questions
-3
votes
3 answers

Distinct items in List using LINQ

I have following class: public class CustomerDTO { public string CardNumber { get; set; } public string CustomerNumber { get; set; } public DateTime FetchedDate { get; private set; } =…
AdrianSean
  • 397
  • 1
  • 5
  • 21
-3
votes
2 answers

What is the most efficient way to count distinct digits in an integer

The number can range from 1 to 1015. I am using this code but it is running out of time. int distinct(long long int a) { int ele[10]={0},i,c=0; if(a==0) return 1; if(a<0) a=a*-1; while(a) { int t=a%10; …
viveksyngh
  • 777
  • 7
  • 15
1 2 3
42
43