It is a famous puzzle problem and has been asked many times in a tech interview.In thsi problem a man has to carry some
loads of banana from one place to another and for every kilometer camel eats a banana, so we have to find maximium no. of
banana we can carry to the destination.
In this problem we will have to cover the distances with some stoppage in between, i.e we will have to carry some banana
to intermediate locations and then to the destination.
I have just coded the solution in C++.
On execting the code
It first asks no.of banana,then total distance,then capacity of the camel,then no of banana required to cover 1km
then it will generate the no of banana that can be transferred along with the no of stoppage in between.
Hope You all like my code. Please do give Star to my repository if you like it.
Thanks.. Aniket Kumar