Transcription of Data Structures and Algorithms - Princeton University
{{id}} {{{paragraph}}}
1 Data Structures and Algorithms !The material for this lecture is drawn, in part, from!The Practice of Programming (Kernighan & Pike) Chapter 2!Jennifer Rexford!2 Motivating Quotations! Every program depends on Algorithms and data Structures , but few programs depend on the invention of brand new ones. !-- Kernighan & Pike! I will, in fact, claim that the difference between a bad programmer and a good one is whether he considers his code or his data Structures more important. Bad programmers worry about the code. Good programmers worry about data Structures and their relationships. !-- Linus Torvalds!3 Goals of this Lecture! Help you learn (or refresh your memory) about:!
Data Structure #2: Hash Table! • Fixed-size array where each element points to a linked list! • Function maps each key to an array index ! • For example, for an integer key h • Hash function: i = h % ARRAYSIZE (mod function)! ...
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}