python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Have trouble doing push to a sub-array in a 2D JS array
Suppose I made a 5 by 2 matrix populated by integer 9
let arr = Array(5).fill(Array(2).fill(9));
Now I want to push integer 8 into the fourth line of the matrix by doing
arr[3].push(8);
I ended up get...
Yani
Votes: 0
Answers: 1
Sort 2D array by matching the last values with the first one in the next index
So basically, I have this array
array = [[1,0],[2,1],[0,3],[3,2]]
Is there any quick method to convert the array to look like this
array = [[0,3],[3,2],[2,1],[1,0]]
What I want is for the first elem...
Vlad Solomon
Votes: 0
Answers: 3
Optimizing array multiplication in fortran
I am trying to optimize the array multiplication of the following type in fortran:
do i = 1, n
do j = 1, n
do k = 1, n
do i1 = 1, n
do j1 = 1, n
do k1 =...
Djole
Votes: 0
Answers: 1
Using strcpy on a 2D char array allocated with malloc
I have a problem, and I cannot figure out the solution for it. I have to programm some code to a µC, but I am not familiar with it.
I have to create an analysis and show the results of it on the scree...
MrByte
Votes: 0
Answers: 2