We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a268f4 commit 4d09d57Copy full SHA for 4d09d57
1.bubbleSort.md
@@ -133,16 +133,16 @@ function bubbleSort($arr)
133
```c
134
void BubbleSort1(int data[],int n) //n为data长度
135
{
136
- int t;
137
- for(int i=0;i<n-1;i++){
138
- for(int j=0;j<n-i-1;j++){
139
- if(data[j] > data[j+1])
140
- {
141
- t = data[j+1];
142
- data[j+1] = data[j];
143
- data[j] = t;
144
- }
145
+ int t;
+ for(int i=0;i<n-1;i++){
+ for(int j=0;j<n-i-1;j++){
+ if(data[j] > data[j+1])
+ {
+ t = data[j+1];
+ data[j+1] = data[j];
+ data[j] = t;
+ }
146
}
147
148
```
0 commit comments