I have an array, which for example contains the values 123456, which obviously contains more than 3 consecutive values.
I want a method that will return true if the array contains at least 3 consecutive values in it, thanks in advance.
for example:
972834 - return true (234)
192645 - return true (456)
etc. etc..
update! :
i have an array in java, it takes in 6 integers. for example nextTurn[], and it contains 8 4 2 5 6 5 at the moment it sorts the array - 2 4 5 5 6 8
how would i get it to return true if there are 3 consecutive numbers throughout the array?
ie so it will find 4 5 6
i would also like it to return the position of the integer in the array, so for the original array 8 4 2 5 6 5
it will return, 2 4 5 or 2 5 6
thanks for all your help guys, appreciated
char *
)