- Deploy to the ic network
- Call the funciton initList to Initialize a list with length of 30000
- Change the code “123” to “1234”
- Deploy to the ic network
I also have this problem, how to do it?
Maybe use Array is one way to fixed it.
A singly linked list is not a good data structure if you need to append things to the end. If you do that repeatedly, this has quadratic complexity. So yes, the solution would be to use an appropriate data structure for what you need.
(The error message is confusing, though. I would expect something like “failed to allocate memory”)