Basic data structures question

I’ve been reading about tries and binary trees, atrees, etc… but I’m
confused as to exactly what they are… are these data structures
“man-made” via the basic data structures like arrays? Also, how would
you make your own hash in Ruby, is this even practical given that Ruby
has its own built in hash?

Thanks a lot!

On Jun 9, 3:29 pm, Justin To [email protected] wrote:

I’ve been reading about tries and binary trees, atrees, etc… but I’m
confused as to exactly what they are… are these data structures
“man-made” via the basic data structures like arrays? Also, how would
you make your own hash in Ruby, is this even practical given that Ruby
has its own built in hash?

Thanks a lot!

Posted viahttp://www.ruby-forum.com/.

It looks like someone has covered this pretty well here:

http://www.brpreiss.com/books/opus8/

Justin To wrote:

I’ve been reading about tries and binary trees, atrees, etc… but I’m
confused as to exactly what they are… are these data structures
“man-made” via the basic data structures like arrays? Also, how would
you make your own hash in Ruby, is this even practical given that Ruby
has its own built in hash?

Thanks a lot!

Yes, you could implement your own hashes in Ruby, using arrays. I’m not
going to type in the code, but back when I was coding in FORTRAN (in
which array was the only built-in data structure) we used to say that
“all data structures are just special cases of array.”