Hi! Is anybody who can give me a solution for this? We have an array with n elements and a number k. We are asked to calculate in how many continuous strings of size exactly k (k is even), the element at the i-th position is in the first half if we sort that continuous string (all values are different). Example: n=6, k=4, the array: 1 4 2 5 9 3, the output will be like this: 0 1 0 3 2 0