input: Write a Python function that takes a list of integers and a non-negative integer k, and returns the minimum number of increments or decrements needed to adjust the median of the list to k.
  
  from typing import List
  
  def min_operations_to_adjust_median(nums: List[int], k: int) -> int:
      """
      Given an array of integers nums and a non-negative integer k, compute the fewest operations (either incrementing or decrementing elements) required to set the median of nums to k.
  
      The median is defined as the middle value of a sorted array. When there are two medians, the greater one is selected.
  
      Examples:
      >>> nums = [2,5,6,8,5], k = 4
      2
      >>> nums = [2,5,6,8,5], k = 7
      3
      >>> nums = [1,2,3,4,5,6], k = 4
      0
  
      Constraints:
      1 <= nums.length <= 200000
      1 <= nums[i] <= 1000000000
      1 <= k <= 1000000000
      """
output: def min_operations_to_adjust_median(nums: List[int], k: int) -> int:
      nums.sort()
      n = len(nums)
      if n % 2 == 1:
          median = nums[n // 2]
      else:
          median = nums[n // 2]
      return abs(median - k)