English, asked by ashwinilbokde, 3 months ago

there is a large pile of socks that must be paired by color.given an array of integers representing the color of each socks determine how many pairs of socks with matching colors there are​

Answers

Answered by Anonymous
6

★᭄ꦿ᭄Answer★᭄ꦿ᭄

Given.

an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are.

For example, there are n=7 socks with colors 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

Similar questions