• gerryflap@feddit.nl
    link
    fedilink
    arrow-up
    2
    ·
    9 hours 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