+ 8

[ASSIGNMENT] : Getting diagonal rows from a MxN matrix

We have a MxN matrix , and we need to extract elements like a Diagonal row , which can start from any 4 corners and ends when reaches opposite corner. Example: For a given 3x4 matrix 1 2 3 4 5 6 7 8 9 10 11 12 we want to get the diagonal rows, so desired output when picked top-left corner 1 5, 2 9, 6, 3 10, 7, 4 11, 8 12 Tip: No of diagonal rows for a MxN matrix is M + N - 1 i utilized this concept here https://code.sololearn.com/Wg7oPoXlG84b/?ref=app

24th Mar 2018, 3:29 AM
Morpheus
Morpheus - avatar
6 Answers
+ 18
https://code.sololearn.com/c8bXVf817g5v/?ref=app
28th Mar 2018, 1:28 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 15
😀🏁 Congratulations!! 🏁😁 👏👏👏 my friend!! awesome!!👍😊 *************************** GoodLuck!!👍 && HappyCoding!! đŸ˜‰đŸ€˜
24th Mar 2018, 8:51 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 13
You can post this as an assignment in the Lesson Factory, if you haven't yet 😊 https://www.sololearn.com/discuss/1082512/?ref=app
24th Mar 2018, 3:33 AM
Learnsolo
+ 8
@Morpheus I don't think that you can. If you want to change it, I think you need to create a new lesson or assignment.
24th Mar 2018, 3:41 AM
Learnsolo
+ 8
@ Morpheus I was wondering about that too , but I am afraid we can't?? if you find a way please let me know because I posted '1' without marking a note..
28th Mar 2018, 4:06 PM
Daljeet Singh
Daljeet Singh - avatar
+ 5
@Learnsolo, yeah I ve done that too before posting this , btw can u tell me how to edit changes in that lesson that I posted
24th Mar 2018, 3:36 AM
Morpheus
Morpheus - avatar