[algogeeks] Finding closest double in a Btree

2012-02-20 Thread Supraja Jayakumar
Hi Question is given a binary tree and a key K, code to find the node with the closest value. I'd be happy to receive some feedback about my solution too. Pls find the code below: class FindingClosestNodeInTree { private static double difference = 0.0; private static doule key = 0.0; int

Re: [algogeeks] Finding closest double in a Btree

2012-02-20 Thread payal gupta
here is the soln. http://ideone.com/Qu0a0#view_edit_box however dere's a problem which needs to be resolved the prob is if the diff is 0 then due to the use of abs() its getting overriden i'm not able to find way out of it... ny suggestns are welcum.. Regards, PAYAL GUPTA. On Mon,