I want to check if any sequence of the elements of an array is repeating and be able to set the size of the sequence. For example:
var array = ["a", "b", "c", "d", "b", "c", "a"]
If you check for size = 1 (meaning if any single element is repeating) I should get true
If you check for size = 2 (meaning if any 2 elements are repeating ) I should get true (b,c sequence is repeating)
If you check for size = 3 I should get false
Thank you for your help. I am really stuck with this one