Sliding Subarray Beauty solution leetcode

Sliding Subarray Beauty solution leetcode User Accepted:3303 User Tried:7764 Total Accepted:3451 Total Submissions:19531 Difficulty:Medium Given an integer array nums containing n integers, find the beauty of each subarray of size k. The beauty of a subarray is the xth smallest integer in the subarray if it is negative, or 0 if there are fewer than x negative integers. Return an integer array containing n – k + 1 integers, which denote the beauty of the subarrays in order from … Read more