+ 2

Please explain the concepts of arrays (multidimensional and jagged arrays)

5th Jan 2020, 3:56 AM
Devi Priyaa
4 odpowiedzi
+ 3
Regardless of languages, i think you’re asking “What is a matrix?” matrix = [ 0 0 0 0 0 0 0 0 0 ] Written in most programs as: matrix = [[0,0,0],[0,0,0],[0,0,0]] Matrices are complicated structures with their own behaviours in mathematics. Multiplying two matrices is not the same as multiplying two integers. This article gives a nice explanation of some of the concepts of manipulating mattices: http://polymathprogrammer.com/2008/08/11/matrices-for-programmers/ After you read that, i suggest looking up whatever language youre coding in. Matrices in python are handled differently than in C++ but the fundamental concepts are the same.
5th Jan 2020, 4:15 AM
Ivan
Ivan - avatar
+ 2
Basically, arrays within arrays. This means that within your array, you can group your elements.
5th Jan 2020, 4:42 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
arr[3][3] = {{1,2,3},{4,5,6},{7,8,9}}; // Representation of 2D array 1 2 3 4 5 6 7 8 9 arr[3][ ] = {{1,2,3},{4,5},{6,7,8,9}}; // Representation of jagged array 1 2 3 4 5 6 7 8 9 Almost every row in a jagged array has different number of columns.
5th Jan 2020, 6:12 AM
Avinesh
Avinesh - avatar
+ 1
Please add C# in the thread tags (your current selection for language course) 👍
5th Jan 2020, 3:58 AM
Ipang