Lesson 17 of 34

2D Arrays: Matrices

10 min 30 XP

2D array ಎಂದರೆ rows ಮತ್ತು columns ಇರುವ ಕೋಷ್ಟಕ, ಅದನ್ನು m[row][col] ಎಂದು ಬಳಸುತ್ತೇವೆ. m.length rows ಸಂಖ್ಯೆ, m[0].length columns ಸಂಖ್ಯೆ.

Example: edit me and press Run

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.

Transpose: m[r][c] ಅನ್ನು t[c][r] ಗೆ ಇಡಿ. ಜನಪ್ರಿಯ matrix interview ಪ್ರಶ್ನೆ.

Challenge

+30 XP

r ಮತ್ತು c (rows ಮತ್ತು columns) ಓದಿ, ನಂತರ matrix. ಪ್ರತಿ row ನ ಮೊತ್ತವನ್ನು ಅದರದೇ ಸಾಲಿನಲ್ಲಿ print ಮಾಡಿ. Input: 2 3 1 2 3 4 5 6 Output: 6 15

Output Loading Java (first time takes a few seconds)
Press Run to see the result here.