All Possible Combinations Algorithm