left to keep track of the k smallest elements seen so far from the left.left_good to mark indices that have at least k smaller elements to the left.k to n-k, updating the left heap and left_good array.right to keep track of the k smallest elements seen so far from the right.bigIndices to count the k-big indices.n-k-1 to k, updating the right heap and incrementing bigIndices if both left and right conditions are met.bigIndices.