There is an array,
arr = [2,[2],[[[2]]],3]
My code should return, 4.
Because [[[2]]]
is in the 4th dimension as well as the highest dimension of arr
.
There is an array,
arr = [2,[2],[[[2]]],3]
My code should return, 4.
Because [[[2]]]
is in the 4th dimension as well as the highest dimension of arr
.
You could count with a while loop or recursion.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.