I am tryign to find out if n/2 occurences of a digit appear in an array, the numbers will be next to each other, eg
A = [1,2,2,4,7,7,7,8,9]
IN this case it should return the 2 but not the 7 as is not n/2 cocurences.
Are you asking for a way to return a digit if it appears an even number of times consecutively(sp?) in an array?
----------------------------------------
There are no onions, only magic
----------------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.