开发者

binary search trees in ruby

Is there a reason why I don't 开发者_JAVA百科see binary search trees used much in Ruby?

Is there an equivalent data structure or class that people typically use instead?

I'm not trying to solve a specific problem; just trying to learn more about the language.

thanks!


Binary search trees are a relatively low-level implementation detail, usually for a map/table abstract data type. In Ruby, if you want a map/table, you just use a Hash. If you have a problem that specifically needs binary search trees, there's also a good chance a Ruby implementation will be too slow to be useful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜