Given an integer array arr and an integer k, count the number of good sub-arrays of arr. A sub-array arr is good if there are at least k pairs of indices [ i, j ] such that i < j and arr[i] == arr[j]. Examples : Input: arr = [3,1,4,3,2,2,4], k = 2 O...
Markdown supported · ⌘↵ to post
No responses yet.