Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Solving it in general is quite trivial - solving it 'fast' is another story. I can write a backtracking algorithm or a constant propagation one on spot. Yet, I am not quite sure how efficient the latter would be, the former is obvious a brute force one.


It's almost certainly NP complete, so an asymptopically fast solution would be one hell of an achievement.


It is subset sum, it is definitely NP complete.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: