Cracking Interviews Exposed
Friday, January 18, 2008
Swap 2 values with subtraction and addition?
#define SWAP(a, b) ((&(a) == &(b)) || \
(((a) -= (b)), ((b) += (a)), ((a) = (b) - (a))))
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment