What is a two-dimensional array in Leetcode
This article will explain in detail what the two-dimensional array in Leetcode is. Xiaobian thinks it is quite practical, so share it with you for reference. I hope you can gain something after reading this article.
two-dimensional array
Two-dimensional array is a kind of array with special structure, which only converts each element in the original one-dimensional array into a one-dimensional array.
A two-dimensional array is similar in implementation to a matrix.
Storage of two-dimensional arrays:
For example: A two-dimensional array A=[[1, 2, 3], [2, 4, 5, 6], [1, 4, 6, 8]] The computer will also request a continuous space in memory and record the index position of the first array.
A[0][0]
In practice, the types of elements stored in an array are not necessarily the same, and different types of elements occupy different numbers of bytes.
About "what is a two-dimensional array in Leetcode" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.