+ 1

Is it possible ? Fill 2D array with loop like this

1 2 3 4 8 7 6 5 9 10 11 12

20th Aug 2020, 7:50 PM
Haseeb Shahzad
Haseeb Shahzad - avatar
6 Answers
+ 2
Haseeb Shahzad you shouldn't implement it that way ,like defining explicitly values for the array indexes ,it should all be implicit when the array size scales like arr[5][6] ,then what will you do ? Here is how I did it ,not sure it is the best optimized way but still hope it helps https://code.sololearn.com/cBUHK5oTMe6t/?ref=app
21st Aug 2020, 11:03 AM
Abhay
Abhay - avatar
+ 4
Can you share your attempt?
20th Aug 2020, 9:01 PM
Abhay
Abhay - avatar
+ 1
Abhay thanks ♄♄
21st Aug 2020, 4:02 PM
Haseeb Shahzad
Haseeb Shahzad - avatar
0
Without initialization and cin statement
21st Aug 2020, 9:03 AM
Haseeb Shahzad
Haseeb Shahzad - avatar
21st Aug 2020, 10:30 AM
Haseeb Shahzad
Haseeb Shahzad - avatar