Short Problem Definition:
Taum is planning to celebrate the birthday of his friend Diksha. There are two types of gifts that Diksha wants from Taum: one is black and the other is white. To make her happy, Taum has to buy B number of black gifts and W number of white gifts.
time complexity is O(1)
space complexity is O(1)
The cost for each present is either the cost of its category, or the cost of the other category + the conversion cost. Just select the minimum.