Posts

Showing posts with the label two-lecture

Lec 7 MIT 6.046J 18.410J Introduction to Algorithms (SMA 5503), Fall 2005

Today starts a two-lecture sequence on the topic of hashing, which is a really great technique that shows up in a lot of places. So we're going to introduce it through a problem that comes up often in compilers called the symbol table problem. And the idea is that we have a table S holding n records where each record, just to be a little more explicit here. So each record typically has a bunch of, this is record x. x is usually a pointer to the actual data. So when we talk about the record x, what it usually means some pointer to the data. And in the data, in the record, so this is a record, there is a key called a key of x. In some languages it's key, it's x dot key or x arrow key, OK, are other ways that that will be denoted in some languages. And there's usually some additional data called satellite data, which is carried around with the key. This is also true in sorting, but usually you're sorting records. You're not sorting individual keys. An...