Suppose you have to develop an algorithm for the optimal arrangement of 5 objects (charger, fan, laptop, sandwich maker, electric kettle, cell phone charger) in a carton that can carry a maximum weight of 20 kg. The weight and corresponding profit of these objects are as follows: (12 kg, $4), (2 kg, $2), (4 kg, $10), (1 kg, $2), (1 kg, $1). Now, find out which objects give you the maximum profit and can be carried in the carton using dynamic programming.