1The Behaviour is Equivalent to:
2
3template <class T> void swap ( T& a, T& b )
4{
5 T c(a); a=b; b=c;
6}
7
8Syntax : Swap(a,b) // a = Number 1 , b = Number 2
9
10Time Complexity: It makes one constructions and one assignments
11 So, Linear O(n) time.