15.04.2018 Views

programming-for-dummies

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

344<br />

Drawbacks of Sets and Linked Lists<br />

(continued)<br />

Now you can use your node to store data<br />

and link with other nodes.<br />

If you mess up on any one of those steps, your<br />

linked list won’t work, and because linked lists<br />

use pointers, your pointers could point anywhere<br />

in memory, causing all sorts of random<br />

problems. The moral is that linked lists are a<br />

powerful and flexible data structure, but they<br />

come at a price of added complexity <strong>for</strong> the<br />

programmer. Accidentally create one dangling<br />

pointer, and you can bring your entire program<br />

crashing to a halt.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!