AWS面试题目
题目如下:
Here we need to solve a realistic problem. For an kind of inventory, it can be returned now or sold in the future. The net revenue of sale for a unit should decrease with the time it is needed to sell, while the return will always happen now and its revenue is a constant.
, pls give a solution to find the balance inventory point above which inventory should be returned? NOTE the net revenue of sale for a unit is a non-increasing function.
Assume that you are given the following interfaces , and it is already implemented.
interface Revenue{
public double getNetSaleRevenue(int saleIndex);
public double getReturnRevenue();
}
目前还没有太好的想法