Showing posts with label duplicated products hackerrank c# solution. Show all posts
Showing posts with label duplicated products hackerrank c# solution. Show all posts

Sunday, July 17, 2022

Duplicated Products | C# | HackerRank

ISet<string> uniqueProducts = new HashSet<string>();
for(int i = 0; i < name.Count; i++)
{
    uniqueProducts.Add(name[i] + " " + price[i] + " " + weight[i]);
}
return name.Count = uniqueProducts.Count; 

horizontal ads