3107-minimum-operations-to-make-median-of-array-equal-to-k

DevGod needs to write a blog entry for this problem!
/**
 * @param {number[]} nums
 * @param {number} k
 * @return {number}
 */
var minOperationsToMakeMedianK = function(nums, k) {
    nums.sort(function(a,b){return a-b;});
    let median = nums[Math.floor(nums.length/2)];
    return Math.abs(median-k);
};