Re: [algogeeks] Re: changing structure of binary tree based on gravity and node selected.
Even if its collapsing into almost a straight line, the structure is still a tree with a node having a maximum of 3 nodes, thus can be called a ternary tree. -- Thanks and Regards, Amol Sharma On Mon, Jan 20, 2014 at 10:50 PM, Don dondod...@gmail.com wrote: Good point, Vikas. What if the balls all have a negative charge and repel each other? On Thursday, January 16, 2014 6:36:06 AM UTC-5, vikas wrote: it will all collapse and form a single monolithic straight line with bunch of balls hanging in between :D On Wednesday, 15 January 2014 10:47:47 UTC+5:30, atul007 wrote: Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a pointer to a node. When you pick the tree from that node up what will be the structure of the tree. You have gravity changing the structure of the tree -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com. -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Re: changing structure of binary tree based on gravity and node selected.
Good point, Vikas. What if the balls all have a negative charge and repel each other? On Thursday, January 16, 2014 6:36:06 AM UTC-5, vikas wrote: it will all collapse and form a single monolithic straight line with bunch of balls hanging in between :D On Wednesday, 15 January 2014 10:47:47 UTC+5:30, atul007 wrote: Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a pointer to a node. When you pick the tree from that node up what will be the structure of the tree. You have gravity changing the structure of the tree -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.
[algogeeks] Re: changing structure of binary tree based on gravity and node selected.
It is no longer a binary tree. The node you pick may have three children. The path from the original root to that node will now be a third branch. Don On Wednesday, January 15, 2014 12:17:47 AM UTC-5, atul007 wrote: Imagine a binary tree lying on the floor with nodes as balls and edges as threads, you are given a pointer to a node. When you pick the tree from that node up what will be the structure of the tree. You have gravity changing the structure of the tree -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To unsubscribe from this group and stop receiving emails from it, send an email to algogeeks+unsubscr...@googlegroups.com.