Count Triplets Equal XOR

Given an array, count the number of triplets (i, j, k) where the XOR of elements from i to j-1 equals the XOR of elements from j to k. In other words, find splits where two adjacent subarrays have equal XOR values.

Examples
Input: [2,3,1,6,7]
Output: 4
Hints

Count Triplets Equal XOR

Given an array, count the number of triplets `(i, j, k)` where the XOR of elements from `i` to `j-1` equals the XOR of elements from `j` to `k`. In other words, find splits where two adjacent subarrays have equal XOR values.