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;
LeetCode 4, Median of Two Sorted Arrays , asks us to find the median of two already sorted arrays without actually merging them. The key ...
No comments:
Post a Comment