Solve Sales by Match

How many pairs of socks can Alex sell? Solving code challenges on HackerRank is one of the best ways to prepare for programming interviews.