|
 |
Orchid XP v8 <voi### [at] dev null> wrote:
> I was thinking maybe I'd try implementing a Huffman coder.
That sounds like a bit advanced... :)
> I need a
> binary tree for that. Does STL happen to have one already? (That would
> obviously be the simplest thing...)
std::set (as well as std::map) is internally implemented as a balanced
binary tree, but if I'm not mistaken, a Huffman coder requires an
unbalanced one, so it may be unusable for that purpose.
But yeah, if you need to create your own dynamic data containers, it
inevitably means you will have to deal with pointers, 'new' and explicit
memory management. (Although using smart pointers may by possible in
this situation.)
--
- Warp
Post a reply to this message
|
 |