Home > Back-end > Ask a question in Java algorithm to solve the train of thought
Ask a question in Java algorithm to solve the train of thought
Time:10-08
Question: is there an A collection of objects, A length is n, each with A value of x, y interest on the properties of the are floating point, now from the collection to choose the number of A, minimum requirements shall not exceed the total amount of k and interest, selected A number of m, could you tell me how to solve in Java? I try to use backtracking algorithm to solve this problem, the current problems is when n more than 50, calculation time very much, don't know if algorithm have what problem, Is there anyone who share the solution,