Yao Zhen 2 years ago
parent c102943431
commit 3e51077c74

@ -425,7 +425,7 @@ Step 1: 进行冒泡排序
Step 2: 将按图书借阅次数排序,若前面的比后面的大,则交换
Step 3: 每次遍历记录是否交换,若没有交换,则排序结束
Step 4: 若借阅次数相同,则按照编号从小到大排序
![打印记录流程图](sort.svg)
![打印记录流程图](sort1.svg)
#### read_data

@ -1,54 +0,0 @@
<mxfile host="65bd71144e">
<diagram id="ktBARE-SRG74nQ3XP5kN" name="Page-1">
<mxGraphModel dx="1092" dy="523" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="3" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fontSize=16;fontColor=#e11414;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry">
<mxPoint x="120" y="140" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="2" value="&lt;font color=&quot;#e11414&quot; style=&quot;font-size: 16px;&quot;&gt;sort_data&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
<mxGeometry x="60" y="20" width="120" height="80" as="geometry"/>
</mxCell>
<mxCell id="5" style="edgeStyle=none;html=1;fontSize=16;fontColor=#fbf9f9;" edge="1" parent="1" source="4" target="6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="120" y="230" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="4" value="&lt;font color=&quot;#fbf9f9&quot;&gt;按借阅次数进行排序&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#e11414;" vertex="1" parent="1">
<mxGeometry x="60" y="130" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="6" value="if无交换排序结束" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#fbf9f9;" vertex="1" parent="1">
<mxGeometry x="60" y="250" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="11" value="" style="endArrow=classic;html=1;fontSize=16;fontColor=#fbf9f9;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="6" target="4">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="120" y="230" as="sourcePoint"/>
<mxPoint x="40" y="160" as="targetPoint"/>
<Array as="points">
<mxPoint y="280"/>
<mxPoint y="160"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="12" value="else" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=16;fontColor=#fbf9f9;" vertex="1" parent="1">
<mxGeometry y="210" width="50" height="30" as="geometry"/>
</mxCell>
<mxCell id="13" value="" style="endArrow=classic;html=1;fontSize=16;fontColor=#fbf9f9;" edge="1" parent="1" target="14">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="120" y="220" as="sourcePoint"/>
<mxPoint x="240" y="220" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="14" value="按编号进行排序" style="rounded=0;whiteSpace=wrap;html=1;fontSize=16;fontColor=#fbf9f9;" vertex="1" parent="1">
<mxGeometry x="220" y="190" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="15" value="if次数相同" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=16;fontColor=#fbf9f9;" vertex="1" parent="1">
<mxGeometry x="110" y="190" width="100" height="30" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 8.8 KiB

@ -0,0 +1,43 @@
<mxfile host="65bd71144e">
<diagram id="dpENVB7H6eD26NbsHmJB" name="第 1 页">
<mxGraphModel dx="832" dy="568" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="4" style="edgeStyle=none;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;html=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=16;" edge="1" parent="1" source="3">
<mxGeometry relative="1" as="geometry">
<mxPoint x="260" y="160" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="3" value="sort_data" style="ellipse;whiteSpace=wrap;html=1;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="180" y="40" width="160" height="60" as="geometry"/>
</mxCell>
<mxCell id="6" style="edgeStyle=none;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;html=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=16;" edge="1" parent="1" source="5">
<mxGeometry relative="1" as="geometry">
<mxPoint x="260" y="290" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="14" style="edgeStyle=none;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;html=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=16;" edge="1" parent="1" source="5">
<mxGeometry relative="1" as="geometry">
<mxPoint x="560" y="200" as="targetPoint"/>
</mxGeometry>
</mxCell>
<mxCell id="5" value="按借阅次数进行排序" style="rounded=1;whiteSpace=wrap;html=1;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="150" y="170" width="220" height="60" as="geometry"/>
</mxCell>
<mxCell id="9" value="if前面的比后边的大" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=20;fontFamily=Architects Daughter;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;" vertex="1" parent="1">
<mxGeometry x="260" y="250" width="200" height="40" as="geometry"/>
</mxCell>
<mxCell id="10" value="交换" style="rounded=1;whiteSpace=wrap;html=1;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="170" y="290" width="180" height="60" as="geometry"/>
</mxCell>
<mxCell id="12" value="排序结束" style="rounded=1;whiteSpace=wrap;html=1;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;fontSize=20;" vertex="1" parent="1">
<mxGeometry x="570" y="180" width="120" height="60" as="geometry"/>
</mxCell>
<mxCell id="15" value="if没有交换" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontSize=20;fontFamily=Architects Daughter;sketch=1;hachureGap=4;jiggle=2;curveFitting=1;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;" vertex="1" parent="1">
<mxGeometry x="400" y="150" width="120" height="40" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 67 KiB

Loading…
Cancel
Save