Algorithms are processes that work upon very specific data structures. They are extremely dependent upon the data structure(s) that they are defined to work upon. A concrete example is the for-loop. In every language, it's defined to work on some list. For-loops don't work on hashes or trees or any other data structure.
Data structures are, well, ways to structure data. They are independent of algorithms. Often, the same data structure will be used in numerous algorithms. The best example of this is the list, used in sorting, searching, iterating, etc.
The pedagogical mistake made in most CS classes is to focus overly much on algorithms without enough focus on data structures, especially early on in the curriculum. Many students are left with a feeling that they have no idea how to think about their stuff, praying that the specific algorithm will work correctly, usually with much hand-waving.
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In reply to Re: Algorithms, Datastructures and syntax
by dragonchild
in thread Algorithms, Datastructures and syntax
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |