Answer:
r = len(A) -1 # needs to be inside the <em>for x</em> ... loop
Explanation:
After appending a result sum to your output list, your value of r remains at its last value. In the case of {-6, 0, 6}, you miss this because r is pointing to "5" after having just located the triple {-8, 3, 5}.
When "left" is reset for a new value of x, "r" needs to be reset, too.
_____
<em>Comment on the algorithm</em>
You have an interesting algorithm here. When written as a procedure in Mathematica, it executes your example problem in 280 us. A less procedural approach that generates all subsets of length 3, then sums those, then picks the ones that have a sum of zero executes in 120 us. Of course, keeping lists of all subsets and their sums uses a lot more memory than your program does.
Putting as much information as possible on a slide is wrong because sometimes, that will create a messy presentation. A messy presentation can become unreadable and if your information is unreadable, it is not effective. Similarly, you do not want to use a font color that blends in with the background. A yellow font on a yellow background could clash negatively or make your information seem to disappear into the background completely. Presenting this on a screen would make it almost impossible to see anything of what you wrote. This would be ineffective, as well. Using the largest font size possible is also not a very good idea because it's going to be too big. It will fill up the entire screen and make everything messy seeming, overwhelming to look at, or unreadable. Another ineffective decision.
Now, although using a maximum of two fonts on a slide is important, this does not specify the fonts which you should NOT use. There are many unreadable fonts that create a messy an ineffective presentation, and just getting to choose any two of them isn't very specific.
The correct answer would be to use a consistent color scheme. Sometimes the most effective presentations are simple, yet well put together.
Answer:
FALSE is the answer of that question
I HOPE IT HELP YOU
GOOGLE IT.... THERE ARE ALOT OF STEPS...