Author: Zhang Zhongliang
First, the team 1, the team's definition: The team is one of the special linear forms, which only allows one end of the team to be inserted, and deleted at the other end of the team. Insert one end called the tail (T), delete one end called the team (h), no one of the elements called the air. The queue follows the principle of "advanced first out", queue shopping, buy tickets, etc., is the most common team. 2, the team's basic operation: (1) Description: Type Queue = array [1..100] of integer; var A: queue; {Definition array} H, D: integer; {Team, tail pointer} (2) Initialization (Figure 1): procedure start; begin h: = 1; D: = 1; end; (3) into the team operation (Figure 2): procedure enter; begin read (s); {read data} INC (D); {Team Tail Plus 1} a [D]: = S; END; (4) Drawing Operation (Figure 3): Procedure Out; Begin Inc (H); {Team Pixabay} a [H ]: = 0; END; Second, Guangtian priority search breadth priority to search for the process similar to the tree of the tree. It has a lot of similarities and teams, which use many ideas of the team, in fact, in-depth study of the team, its basic operations and queues almost the same. Third, the team and the wide range of priority search Figure 4 shows the traffic map from urban A to city H. As can be seen from the figure, from the city A to the city h to pass several cities. Now find out a country with a minimum city. Figure 4 Analysis: Seeing this picture is easy to think of using adjacent distances, 0 means you can go, 1 means can't go. Figure 5. Figure 5