Thursday, 13 February 2014

Week 6 SLOG

  This week we finally learned about trees. So why do we need to learn trees and other recursively defined data structures? Well, there are actually quite a few reasons why people went through all this trouble to come up with the idea. Here I've compiled a short list of the benefits of using trees and other recursive data structures:


  1. Simpler and more readable code.
  2. No need to preserve state on each iteration.
  3. More often than not more memory-efficient. 
  4. Easier to search for items, since tree traversals can be easily coded.

No comments:

Post a Comment