Solution for hackerrank problem "Mandragora Forest" in Java.

The evil forest is guarded by vicious mandragoras. Garnet and her pet must make a journey through. She starts with pet health point (s) and 0 experience points.

.....

Complete the mandragora function in the editor below. It must return an integer that denotes the maximum number of experience points that Garnet can earn.

MoreDetails about the problem in in HackerRank