0
Counting number of elements excluding nulls?
How can I count the number of elements not includint nulls in a generic array? I know that I can loop until a null is reached , but is there way to count in constant time? I can’t think of a way
1 ответ
0
Set a counter that only increments inside a loop if the value is != null