you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 4 months ago

Your example doesn't make sense to me. Why would you modify the entire list by checking if something is in it? Also, you can totally edit the list via a pointer, that's how you're supposed to edit the list if you want any performance. Otherwise you'd be copying the list on every modification, which is terribly inefficient

  • source
  • parent