Solve Sales By Match Problem on Hacker Rank Using C#

Опубликовано: 13 Июль 2026
на канале: Codes Evidence
2,593
25

Solve Sales By Match Problem on Hacker Rank Using C#.
There is a large pile of socks that must be paired by color. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are.

Examples
n=7
ar=[1,2,1,2,1,3,2]

There is one pair of color 1 and one of color 2 . There are three odd socks left, one of each color. The number of pairs is 2.

If you want to solve this type of problem next time own their own then please watch this video till the end, you may solve this problem just copying the code but copying code is not perfect solution.

After watching this video if you still facing any challenges or issue please feel free to write to us on [email protected] or in comment section
We love to hear your query and we will back to you as soon as possible.

Happy Learning
Codes Evidence