0

I would like to convert a dictionary of words into a binary file. after some search time, I found out that ternary search tree is the best option for my usage. I couldn't find how to serialize it to a file. Each node will have a char value, 3 pointers (for three children - low,equal,high) and another field (for saving other information) How can I serialize it? Thanks

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065
leah
  • 433
  • 5
  • 7
  • recursively and with lots of love. Seriously, where are you stuck? And why can't you just put a list of strings into a file? – Thomas Jungblut Mar 02 '14 at 12:15
  • @ThomasJungblut I need to use as less space as I can get, so I would like to serialize the tree into binary and then deserialize it – leah Mar 02 '14 at 12:20
  • Traditional answer would be to have the tree, and every object in it, implement `Serializable`. Then just write it out with an ObjectOutputStream. That simplifies the problem to one object at a time. – keshlam Mar 02 '14 at 16:28

0 Answers0