Native lists are not arrays; O(i) access cost is prohibitive. Try Vector or Array ( or even Sequence, which at least has O(log i) access cost ).
O(i)
Vector
Array
Sequence
O(log i)
Also, actually test against the reference solution, not the user one.
Loading collection data...
Native lists are not arrays;
O(i)
access cost is prohibitive. TryVector
orArray
( or evenSequence
, which at least hasO(log i)
access cost ).Also, actually test against the reference solution, not the user one.