Every feature of the plugins on one example. Follow the steps in order; the pictures show what you should see.

Binary search

1. Run the flowchart

Click Run. The flowchart asks for n, then for the numbers of the array (sorted) and for the number to find; type them in the console under the flowchart, one at a time, and press Enter.

1. Run the flowchart

2. Step by step and a breakpoint

Step runs one block: the current block is marked and the Variables panel shows lo, hi and mid. Alt + click on the loop block sets a breakpoint (a red dot): Run then stops there.

2. Step by step and a breakpoint

3. Back and the timeline

◀ Back goes one step back, and the slider under the buttons moves along the whole run, also after the end. The input you typed is kept, so nothing is typed again.

3. Back and the timeline

4. The arrays panel

The array a is drawn as bars: the cells read are yellow, and lo, hi and mid are arrows under the cells. You see the part of the array that is searched being halved.

4. The arrays panel

5. The trace table

Trace table shows the values of the variables after each step; a click on a row goes to that step.

5. The trace table

6. Complexity

Complexity… runs the flowchart for n = 10 … 500 and draws the steps. The whole program grows like ONie: reading the n numbers takes n steps, and the search itself adds only about log n steps. Compare with bubble sort in lesson 3.1, which grows like O(n²).

6. Complexity

7. The code in other languages

Code shows the same algorithm in Python, C, C++, Java, C#, Pascal and JavaScript; while it runs, the line of the current block is marked.

7. The code in other languages

8. For teachers

In the editor (the Algorithm button of TinyMCE): File, Code to diagram makes such a flowchart from Python code; an exercise with tests, a Parsons problem in the quiz and the class view are described in the guide at the top of the course. The C++ examples of the lessons here run with Run (CodeLab).