DEV Community

Discussion on: Typescript Data Structures: Linked List

Collapse
 
glebirovich profile image
Gleb Irovich

Hey Mateusz, thanks for your feedback! Probably, the sentence is not very well structured. What I meant is that in the traverse example we don’t have prior knowledge of the size and therefore we cannot use for loops. However we can use a while loop or alternatively a recursive function.
It’s a great input regarding the call stack overflow πŸ‘πŸ‘πŸ‘, I definitely missed it out of sight, since I alway tend to be biased toward functional approaches.