input: Write a python function to solve the knapsack problem and return the maximum value that can be put in a knapsack of capacity max_weight.
  assert knapsack([1, 2, 3], [10, 15, 40], 6) == 55
  assert knapsack([2, 3, 4, 5], [3, 4, 5, 6], 5) == 7
  assert knapsack([1, 2, 3], [10, 20, 30], 5) == 50
output: def knapsack(weights, values, max_weight):
      n = len(weights)
      dp = [[0 for _ in range(max_weight + 1)] for _ in range(n + 1)]
      
      for i in range(n + 1):
          for w in range(max_weight + 1):
              if i == 0 or w == 0:
                  dp[i][w] = 0
              elif weights[i - 1] <= w:
                  dp[i][w] = max(values[i - 1] + dp[i - 1][w - weights[i - 1]], dp[i - 1][w])
              else:
                  dp[i][w] = dp[i - 1][w]
                  
      return dp[n][max_weight]