input: Write a Python function to determine if the number of inversions in two different types are equal.
  assert check_inversions([1,0,2],3) == True
  assert check_inversions([1,2,0],3) == False
  assert check_inversions([1,2,1],3) == True
output: def check_inversions(lst, n):
      def count_inversions(lst):
          inv_count = 0
          for i in range(len(lst)):
              for j in range(i + 1, len(lst)):
                  if lst[i] > lst[j]:
                      inv_count += 1
          return inv_count
      
      inversions = count_inversions(lst)
      return inversions % 2 == 0