This website works better with JavaScript.
Home
Help
Register
Sign In
UBB
/
sort
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
3
Activity
Browse Source
optimize swap
pull/26/head
Chris Cromer
2 years ago
parent
751e6d9cb4
commit
6ff4147448
Signed by:
cromer
GPG Key ID:
39CC813FF3C8708A
1 changed files
with
6 additions
and
3 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+6
-3
src/swap.c
+ 6
- 3
src/swap.c
View File
@ -19,7 +19,10 @@
*
@
param
yp
Segundo
valor
*/
void
swap
(
int
*
xp
,
int
*
yp
)
{
int
temp
=
*
xp
;
*
xp
=
*
yp
;
*
yp
=
temp
;
if
(
xp
=
=
yp
)
{
return
;
}
*
xp
=
*
xp
+
*
yp
;
*
yp
=
*
xp
-
*
yp
;
*
xp
=
*
xp
-
*
yp
;
}
Write
Preview
Loading…
Cancel
Save