We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Sales by Match
- Discussions
Sales by Match
Sales by Match
Sort by
recency
|
320 Discussions
|
Please Login in order to post a comment
def sockMerchant(n, ar):
Solution in C# int result = 0; IEnumerable distinctArr = ar.Distinct(); foreach(int i in distinctArr) { int noOfItems = ar.FindAll(x => x == i).Count(); result += noOfItems / 2; }
return result;
def sockMerchant(n, ar): # Write your code here ar.sort() _dict = {}