Re: [algogeeks] matix flipping
This question was asked in a Microsoft interview 2 years back. On Mon, Jun 7, 2010 at 8:05 PM, divya jain wrote: > let a[n][n] be the input array nd b[][] be the output > > > for(i=0;i for(j=0;j b[i][j]=a[n-j-1][n-i-1] > > > > On 7 June 2010 08:26, sharad wrote: > >> write a c routine to flip an nXn matrix about its non major diagnol >> >> >> 3 4 5 >> 6 7 9 >> 1 2 8 >> >> Transpose is: >> 8 9 5 >> 2 7 4 >> 1 6 3 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] matix flipping
#include using namespace std; int main(){ int a[4][4]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16}; int i=0,j,n=3,l=0,m=n; j=n; while(i<=n){ int i1=i,j1=j,k=0,l=n; for(;k wrote: > write a c routine to flip an nXn matrix about its non major diagnol > > > 3 4 5 > 6 7 9 > 1 2 8 > > Transpose is: > 8 9 5 > 2 7 4 > 1 6 3 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] matix flipping
@Sharad, 3 4 5 A= 6 7 9 1 2 8 If B[i,j] = A[n-j, n-i] then --- 8 9 5 B = 2 7 4 1 6 3 Mohit Ranjan On Mon, Jun 7, 2010 at 8:26 AM, sharad wrote: > write a c routine to flip an nXn matrix about its non major diagnol > > > 3 4 5 > 6 7 9 > 1 2 8 > > Transpose is: > 8 9 5 > 2 7 4 > 1 6 3 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] matix flipping
let a[n][n] be the input array nd b[][] be the output for(i=0;i wrote: > write a c routine to flip an nXn matrix about its non major diagnol > > > 3 4 5 > 6 7 9 > 1 2 8 > > Transpose is: > 8 9 5 > 2 7 4 > 1 6 3 > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.