well it can be done using recursion
void Transpose(int** A, int N) // Square size - 1
{
if(N == 0) // Transpose of a 1 X 1 Matrix
return;
else
{
Transpose(A,N-1);
for(int i=0; i<N;i++)
{
int temp = A[i][N] ;
A[i][N] = A[N][i];
A[N][i] = temp;
}
}
}
correct me if anything wrong
Thanks & Regards
Shashank " Best Way to escape from Problem is to solve It"
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.