How to solve the problem of cutting rope by Java
This article introduces the relevant knowledge of "how to solve the rope cutting problem with Java". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
The problem of cutting rope
Title:
To give you a rope of length n, please cut the rope into m segments (m, n are all integers, n > 1 and m > 1), and the length of each rope is recorded as k [0], k [1],. K [m].
What is the possible maximum flight of k [0] * k [1] *. K [m]?
For example, when the length of the rope is 8, we cut it into three segments of length 2, 3 and 3, respectively, and the maximum product is 18.
Int maxProductAfterCutting (int length) {if (length)