Binary Tree Implementation in C# ?
How to implement three stack in one array (single dimentional) as efficiently as possible.
Ex array[i], array[i+2], array[i+4], ... can be used for stack 1
array[i+1], array[i+3], array[i+5], ... can be used for stack 2
array[N], array[N-1], array[N-2], ... can be used for stack 3, where N is the size of the array.
This is one implementation.
I want more efficient algorithm than this. With this approach 50% of the array space is wasted in worst case.
Where do you use such trees? What kind of problems are these best suited for? What operations are fast with these kind of trees?
What is the difference between the two, what kind of problems would you use such trees?
You have binary tree with all but one numbers from n to m. You need to find the missing number..
E.g. given a binary tree with all numbers from 10 to 100 except one in that 10-100 range. Find the the missing number
Given a binary tree, find the maximum/minimum element in the tree?
You need to find a given element (integer) in a binary tree. On an unsuccesful search, you need to find the next largest element
How do you Convert a binary tree to a B-Tree in the fastest possible way with least amount of memory. What are the things to look for?
Consider a binary tree that store a integer data in each node. You need to find the average of all elements in the tree within 10% of the actual value
How can you improve binary tree searches using sentinels..