[algogeeks] Re: Algorithm for time-slot allocation

2006-05-08 Thread adak
Now I've goofed up. Anish, I MEANT to say that I have NOT heard of an algorithm that fits your needs. Sorry. It appears from your description Anish, that the proper distance between any two scheduled time slots should be STDistance = Calender Depth / Number of Time Slots required by the queue.

[algogeeks] Insertion in a binary tree.

2006-05-08 Thread shishir
Hi, I am looking for a method for left to right insertion in a binary tree( mind it, its not BST am talking about). A simple binary tree where every root has not more than two childs and the insertion is always done starting from the leftmost side of any given node. 13

[algogeeks] Re: Insertion in a binary tree.

2006-05-08 Thread shishir
Well, I was aware of BFS solution , but am looking for something more elegant than this. Does, any other method exist to do this. Thanks for your reply anyways ~Shishir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[algogeeks] Re: Insertion in a binary tree.

2006-05-08 Thread akshay ranjan
I think that this tree would always be balanced till one level from the leaves. so employing bfs wouldn't be optimum. you can check if the tree is full or not at the last level . if it is not full insert at that point , in case if the tree is full you need to insert in the leftmost node in the

[algogeeks] Re: Algorithm for time-slot allocation

2006-05-08 Thread [EMAIL PROTECTED]
Hello Akshay, Thanks for starting the discussion, I will try to add more information to my question. Mainly, the algorithm is supposed to solve Traffic burstiness problem by shaping it. The calendar is scheduling the time-slots in a round robin fashion. And the number of time slots allocated to

[algogeeks] Re: Insertion in a binary tree.

2006-05-08 Thread W Karas
shishir wrote: Hi, I am looking for a method for left to right insertion in a binary tree( mind it, its not BST am talking about). A simple binary tree where every root has not more than two childs and the insertion is always done starting from the leftmost side of any given node.

[algogeeks] Re: Algorithm for time-slot allocation

2006-05-08 Thread [EMAIL PROTECTED]
At this time, I have following 2 options in my mind, 1. When a request for a queue with a requirement of m slots, given the calendar depth n, I find n / m, say p. p is the maximum distance that can be provided amongst the slots of a queue in the calendar table. For example, n = 252 and m = 4 then

[algogeeks] Re: Insertion in a binary tree.

2006-05-08 Thread Dhyanesh
This method is better ! It would take only O ( log(n) ) time. -Dhyanesh On 5/8/06, W Karas [EMAIL PROTECTED] wrote: shishir wrote: Hi, I am looking for a method for left to right insertion in a binary tree( mind it, its not BST am talking about). A simple binary tree where every root

[algogeeks] Re: Insertion in a binary tree.

2006-05-08 Thread shishir
@Karas Can you please take some time to brief us about the algo of your program. Thanks, ~Shishir --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to