[algogeeks] fwd : google code jam 2006

2006-08-20 Thread Balaji Gopalan
fwded message:From: Neetu Vacin [mailto: [EMAIL PROTECTED]] Sent: Friday, August 18, 2006 11:28 AMTo: 'Neetu Vacin'Subject: Google Code Jam - Register Now! Hi Everyone, Hope all is going well! Google Code Jam registration is now open, so I wanted to encourage all of you (andyour friends!)to

[algogeeks] Re: random sampling without knowing the total data count?

2006-04-08 Thread Balaji Gopalan
hito select k random data points from a stream of data,1) select the first k points - D[1] to D[k] are selected 2) for each data point D[i] after that (ie ik) i) select D[i] with a probability of k/i , where i is the number of points which have come in the stream till now ii) if D[i] (the

[algogeeks] Re: Hi all...seniors please share ur thoughts

2006-03-29 Thread Balaji Gopalan
hi code jam aspirantsalthough it is not *absolutely necessary* to read Knuth's art of computer programmingto become a good coder, it does help you a lot, and doesnt harm u in any way. you dont need to understand evry page of it, just read whatever interests you in that.it will surely help in your

[algogeeks] Re: DataStructure - Push,Pop Find_Min in O(1)

2006-03-25 Thread Balaji Gopalan
hithe extension of this prob asks whether one more function extract_min() (which returns and deletes the current minimum ) can be implemented in O(1) time.[hint: it cant be...y?]balaji On 3/25/06, ridvansg [EMAIL PROTECTED] wrote: --~--~-~--~~~---~--~~ You

[algogeeks] tree lock problem

2006-03-24 Thread Balaji Gopalan
hii had this question in my interview:you are given an n-ary tree.you are given its root R and a node N.the problem is to determine if u can lock the node N, given the constraints:1) you cannot lock a node if any of its ancestors is locked. that is, if you lock a node N, then any node S in the

[algogeeks] Re: tree lock problem

2006-03-24 Thread Balaji Gopalan
cannot lock node N.Time complexity : O(nodes)-Dhyanesh On 3/24/06, Balaji Gopalan [EMAIL PROTECTED] wrote: hii had this question in my interview:you are given an n-ary tree.you are given its root R and a node N.the problem is to determine if u can lock the node N, given the constraints: 1) you

[algogeeks] minimum moves puzzle

2006-01-21 Thread Balaji Gopalan
hihow can this puzzle be approached?9 0s are placed from 0th cell to 8th cell of an array; 9 1s are placed from 10th cell to end of the array. On the whole, there are 19 cells, so that just one cell remains unoccupied. 0s only move rightward; 1s move leftward. Every move is either a move to the