3318. Find X-Sum of All K-Long Subarrays I

Difficulty: Easy

Topics: Array, Hash Table, Sliding Window, Heap (Priority Queue), Weekly Contest 419

You are given an array nums of n integers and two integers k and x.

The x-sum of an array is calculated by the following procedure:


Count the occurrences of all elements in the array.
Keep only the...