Re: [algogeeks] pl advice

2011-04-13 Thread Raunak Agrawal
Head First Servlet and JSP On Thu, Apr 14, 2011 at 10:23 AM, Abdul Rahman Shariff ears7...@gmail.comwrote: any 1 can please tell me abt a good book on for java ee covering servelets and jsp's thanks in advance -- Ehab Abdul Rahman Shariff -- You received this message because you

Re: [algogeeks] Re:

2011-04-03 Thread Raunak Agrawal
lol :P On Sun, Apr 3, 2011 at 9:32 PM, Carl Barton odysseus.ulys...@gmail.comwrote: Haha On 3 April 2011 15:28, Arpit Sood soodfi...@gmail.com wrote: assignment problem ? haha On Sun, Apr 3, 2011 at 7:16 PM, Dr. Deepak Garg dr.gar...@gmail.comwrote: Beta, puchna hi tha, to mujhse

Re: [algogeeks] Ties The Rope With Minimum Cost ..Interesting For Geeks

2011-03-28 Thread Raunak Agrawal
I think the possible solution is : *Tie the highest two ropes at the end of the rope.* * * This is because of the following reason: Eg: Rope 1: Size 10 mtr Rope 2: Size 13 mtr Rope 3: Size 5 mtr Rope1-- Rope2-- Rope3 Cost: (10+13) + (13+5) = 41 Rope1--Rope3-- Rope2 Cost:

Re: [algogeeks] Re: Median of Binary Tree

2011-03-28 Thread Raunak Agrawal
I am assuming that the median is the sum of all the values stored in the nodes divided by 2. So I am traversing all the nodes recursivelyand finding the median of them. On Mon, Mar 28, 2011 at 5:12 PM, kunal srivastav kunal.shrivas...@gmail.com wrote: median is defined for a sorted list

Re: [algogeeks] Re: Ties The Rope With Minimum Cost ..Interesting For Geeks

2011-03-28 Thread Raunak Agrawal
@Dave: Dude...u didn't count the cost for tying the two ropes i.e. (3 and 4) together with (5 and 6). On Mon, Mar 28, 2011 at 9:19 PM, Dave dave_and_da...@juno.com wrote: @Bittu. The ungreedy algorithm works. Repeatedly tie the two shortest ropes. E.g., suppose the ropes are 3, 4, 5, and 6

Re: [algogeeks] Ties The Rope With Minimum Cost ..Interesting For Geeks

2011-03-28 Thread Raunak Agrawal
my iPhone On Mar 28, 2011, at 8:36 PM, Raunak Agrawal raunak.ra...@gmail.com wrote: I think the possible solution is : *Tie the highest two ropes at the end of the rope.* * * This is because of the following reason: Eg: Rope 1: Size 10 mtr Rope 2: Size 13 mtr Rope 3: Size

Re: [algogeeks] Re: Median of Binary Tree

2011-03-27 Thread Raunak Agrawal
We can do it in a recursive manner: public int getRecursiveMedian(Node node) { int leftMedian = 0; int rightMedian = 0; if(node.getLeft() != null) { leftMedian = getRecursiveMedian(node.getLeft()); } if(node.getRight() != null) { rightMedian =

Re: [algogeeks] Announcing ITRIX OPC 2011

2011-03-27 Thread Raunak Agrawal
Can you please provide the question...as I am not able to see the problem :( On Sun, Mar 27, 2011 at 10:58 PM, Kunal Patil kp101...@gmail.com wrote: How to solve that Lucky Sequence Again problem... i tried it using vectors...for small values it succeeded.. but it wasn't calculating for 10^10