Please let me know if you have a solution for this.
A robot is capable of mining one gram of mineral per day. It also has the ability to construct another robot. That new robot becomes available for use the next day and can be involved in mining or can be used to construct yet another robot.
A robot can either mine one gram of mineral or spend the day constructing another.
Write a program to compute the minimum number of days required to mine n grams of mineral.
Input: 4, Expected Output: 3
Input: 99, Expected Output: 8