Here is a puzzle:
I have lists of neutral comments, positive comments, and negative comments. Any of the lists could be empty or of any size.
I wish to select roughly 2 comments in total, sometimes 1, sometimes 3. There is a chance that I will only have a total of 1 comment to choose from anyway (in all 3 lists)
I also have a value that is positive or negative. If it’s positive I need to ensure not all my comments I select are negative, given that there are some positive ones. If its negative, I need to do the reverse.
How do you do that?
If the mere thought of it makes your head explode, you will never be a programmer. If you can see immediately how to do it, in explicit steps, efficiently and accurately. Then you may be a very good programmer one day. Hopefully I’ll have sussed it before anyone posts a good reply :D