algorithm diagram -


This is the largest search algorithm diagram:

So, I wonder how Hanoi Tower Program :

Package Tunnel; Public square tower app {static int n = 3; Public stationary zero main (string [] algens) {TowersAP.Dotores (3, 'A', 'B', 'C'); } Public static zero doTowers (int n, char, four differences, four) {if (n == 1) {System.out.println ("" + + "to +" to "+ 1" disc); } Other {Dover (N-1, from, from, difference); DoTowers (from N-1, difference, from, to);}}} P> I can not drag it. Anybody can help me!

Your puzzle is that Algorithm is recursive, an option to translate into a running algorithm with a steak, but it loses some high level structure of the algorithm, it would be good to show the recursive structure.

A value for I'm unaware of the flow-chart idioms, but what I attract is the basic algorithm in the form of a flow chart, and a box around it is used with the same name as the call, since the mother- There are a few different criteria for father calls, so you can provide them for new variables that have been passed in the form of a parameter. Call is called "Call Dover" or similar. Is not to be labeled.


Comments