I was using linked-list to append things to the <i>head</i>, which was supposed to be it&#x27;s optimal use case. I&#x27;ve refactored the function it&#x27;s calling to take an <i>n</i> argument, which means to leave first <i>n</i> holes in the returned vector for the calling function to fill.<p>I had also used a linked list of characters to represent strings to iterate through them one by one. This was very slow compared to iterating through an array.<p>Linked-lists were supposed to be O(1) inserting at the head, and O(n) iterating through it. However, it&#x27;s no match against array O(1) assignment and O(n) array iteration.