title: Objective-C Data Structures (Building my own DAWG)
body: <p>After not programming for a long, long time (20+ years) I'm trying to get back into it. My first real attempt is a Scrabble/Words With Friends solver/cheater (pick your definition). I've built a pretty good engine, but it's solves the problems through brute force instead of efficiency or elegance. After much research, it's pretty clear that the best answer to this problem is a DAWG or CDWAG. I've found a few C implementations our there and have been able to leverage them (search times have gone from 1.5s to .005s for the same data sets). </p>
  
  <p>However, I'm trying to figure out how to do this in pure Objective-C. At that, I'm also trying to make it <a href="http://clang.llvm.org/docs/AutomaticReferenceCounting.html" rel="nofollow">ARC</a> compliant. And efficient enough for an iPhone. I've looked quite a bit and found several data structure libraries (i.e. <a href="http://cocoaheads.byu.edu/code/CHDataStructures" rel="nofollow">CHDataStructures</a> ) out there, but they are mostly C/Objective-C hybrids or they are not ARC compliant. They rely very heavily on structs and embed objects inside of the structs. ARC doesn't really care for that.</p>
  
  <p>So -  my question is (sorry and I understand if this was tl;dr and if it seems totally a newb question - just can't get my head around this object stuff yet) how do you program classical data structures (trees, etc) from scratch in Objective-C? I don't want to rely on a NS[Mutable]{Array,Set,etc}. Does anyone have a simple/basic implementation of a tree or anything like that that I can crib from while I go create my DAWG?</p>