Help in deriving an algorithm.Every morning, customers: 1, . . . , n show up to get their morning coffee from kubal. Suppose the omniscient barista actually knows all of the customers, and knows their orders, o1, o2, o3, . . . , on. All customers give tips (some give larger tips, some smaller); let Ti be the baristas expected tip from customer i. Some drinks like a simple double-shot, are easy and fast, while some other orders, like a hazelnut mocha soy-milk latte take longer. Let ti be the time it takes to make drink oi . Assume the barista can make the drinks in any order that he/she wishes, and that he/she makes drinks back-to-back (without any breaks) until all orders are done. Based on the order that he/she chooses to complete all drinks, let Di be the time that the barista finishes order i. Devise an algorithm that helps the barista pick a schedule that minimizes the quantity: n ∑ i TiDi In other words, he/she wants to serve the high-tippers the fastest but he/she also wants to take into consideration the time it takes to make each drink. (point 5) (Hint: think about a property that is true about an optimal solution.) Prove the correctness of your algorithm. (point 5)