input: Write a python function to implement the 0/1 Knapsack problem given a list of values, weights, and the maximum capacity.
  assert knapsack([60, 100, 120], [10, 20, 30], 50) == 220
  assert knapsack([10, 20, 30], [1, 2, 3], 4) == 40
  assert knapsack([10, 40, 30, 50], [5, 4, 6, 3], 10) == 90
output: def knapsack(values, weights, max_capacity):
      n = len(values)
      dp = [[0] * (max_capacity + 1) for _ in range(n + 1)]
      
      for i in range(1, n + 1):
          for w in range(1, max_capacity + 1):
              if weights[i - 1] <= w:
                  dp[i][w] = max(dp[i - 1][w], dp[i - 1][w - weights[i - 1]] + values[i - 1])
              else:
                  dp[i][w] = dp[i - 1][w]
      
      return dp[n][max_capacity]