My CS50 summary: Data Structures

Happyday
Jun 19, 2021

Linked lists: [] -> [] -> []. Each rectangle is node. Each space for pointers is cost.

In a sense of spaces, trees use two pointers(cost).

And long story short, doing so might cost you a little extra time. But if you’ve got a lot of data, keeping that thing balanced and logarithmic in height and not long and stringy in the linear in height it’s probably, depending on your application, going to save you quite a bit of time overall.

And, indeed, hashing really just means to look at some input and produce, in this case, some numeric output that outputs the like bucket 0, 1, 2 or 3 based on some characteristic of that input.

A hash table is about storing information, but storing information so as to get to it more quickly.

--

--