Hacker News new | past | comments | ask | show | jobs | submit login

Yes, I would say the relationship is the opposite. Data structures imply a set of algorithms based on the promises of the data structure implementation. Algorithms themselves are free-floating things that can be reasoned about just as well in a C program as an instruction flow diagram as a Turing machine program. Take for instance an algorithm to divide two 32-bit integers. Or an algorithm that computes the max in a sequence (which is an abstraction) of numbers. There is no data structure, unless the argument is that a memory cell is itself a data structure.



As the title of Wirth's book goes:

Algorithms + Data Structures = Programs




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: