FIND THE ANSWERS

I need to implement a Btree that uses strings instead of integer for it's values?

Answer this question

  • I need to implement a Btree that uses strings instead of integer for it's values?


Answers

Answer #1 | 23/12 2013 06:00
It would be better if you could mention which programming language you are using. Anyways, I haven't done much binary tree, but the way I can think of it is, you can take an array of strings (in C, that would be a 2D character array), then you can think of array[1] as the root. Then you can fill in the rest of the tree like this: For any node array[n], the left child will be array[2n] and the right child will be array[2n+1] Hope that helped. There may be other ways of creating a binary tree. Hopefully someone else can mention any other way that might be easier.
Positive: 51 %

Possible answer

You'll notice that the stack enforces a certain order to the use of its ... implement the stack. Remember that we need to ... implementation, we need ...
Read more
Positive: 51 %
Creating Format Strings. You have seen the use of the printf() and format() methods to print output with formatted numbers. The String class has an ...
Read more
Positive: 46 %
... and how to implement one in C++ ... Because binary trees have log (base 2) n layers, ... Due to the use of pointers, ...
Read more
Positive: 32 %
... you should have a good understanding of the object class and its ... Instead, you would use ... You need to know how to use and implement ...
Read more
Positive: 9 %

Show more results