There are three (as I know of) methods to solve this problem:
1) Brute-force
2) Limited search
3) Monte-Carlo Method
or a combination of the above.

Limited Search:
A limited search would start with one song (e.g. the longest one), then choose a second one. If the second one fits, you choose a third one, and so on...

Monte-Carlo Method:
This method create random permutations of songlists. It then checks each songlist whether it is below the length limit and chooses the best fit.

A combination would be to e.g. first do a Monte-Carlo, then search the leftover songs for a potential better fit of one of the already used songs.

One thing that couldbe used is a sorted list of entries.

[ 11. March 2003, 17:50: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.