no banana@lemmy.world to Lemmy Shitpost@lemmy.world · 2 年前Lmklemmy.worldimagemessage-square71linkfedilinkarrow-up1844arrow-down10
arrow-up1844arrow-down1imageLmklemmy.worldno banana@lemmy.world to Lemmy Shitpost@lemmy.world · 2 年前message-square71linkfedilink
minus-squareAnanace@lemmy.ananace.devlinkfedilinkarrow-up14·2 年前If you build a linked list in C, and put the pointer to the next entry as the first element in your struct, then you only need a single variable (and two comparisons) to do sorted insertion into the list.
If you build a linked list in C, and put the pointer to the next entry as the first element in your struct, then you only need a single variable (and two comparisons) to do sorted insertion into the list.