I know that a question similar to this has been asked before, but I want to ask this, which is slightly different:
Here is example: counts[[0,10,4,2], [0,0,0,0,5,7]]
If I wanted to count the number of a specific element, lets say 0 in a two dimensional array for one part of the array like counts[0]
, how would we do so? Trying to do things for project Euler q3. So like the example output here should be 1, if we did it for counts[1]
which should give: 4.