Skip to content

Commit 6f74a5a

Browse files
Update sorting/bubble_sort.cpp
Co-authored-by: realstealthninja <[email protected]>
1 parent 4f12b9c commit 6f74a5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sorting/bubble_sort.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
* An additional variable is required for this operation. x = 5, y = 10.
1515
* We want x = 10, y = 5. Here we create the most variable to do it.
1616
*
17+
* ```cpp
1718
* int z;
1819
* z = x;
1920
* x = y;
2021
* y = z;
22+
* ```
2123
*
2224
* The above process is a typical displacement process.
2325
* When x assigns the value to x, the old value of x is lost.

0 commit comments

Comments
 (0)