Subset-sum problem in PHP with MySQL
问题 following Problem: I have a MySQL database with songs in it. The database has the following structure: id INT(11)(PRIMARY) title VARCHAR(255) album VARCHAR(255) track INT(11) duration INT(11) The user should be able to enter a specific time into a php form and the php function should give him a list of all possible combinations of songs which add up to the given time ±X min. So if the user wants to listen to 1 hour of music ±5 minutes he would enter 60 minutes and 5 minutes of threshold into