Help please :)
Hi everyone. I've been working on this code for like three weeks and I have no idea how to do it. So basically the code tells you how many pairs of equal numbers there are in an inputted list. The way I tried to solve it is that I compared the first number in the list to all the others, then had that first number delete itself, and then had the new first number compare to all the others. When the length of the list is at one, the code is supposed to break. But nothing I do works when working on this code. Help me please? Thanks.
Just a few questions to help me know how the program should behave.
What is an equal pair?
Is the array layed out like:
[ [a,b], [c,d], ......, ]
[ a, b, ..., ]
Does a list containing [1,1,1] have 2 equal pairs?