Count of distinct alternate triplets of indices from given Array | Set 2
Given a binary array arr[] of size N, the task is to find the count of distinct alternating triplets. Note: A triplet is alternating if the values of those indices are in {0, 1, 0} or {1, 0, 1} form. Examples: Input: arr[] = {0, 0, 1, 1, 0, 1} Output: 6Explanation: Here four sequence of "010" and tw