[algogeeks] Recursion in blobs
Today in a data structures class we went over blob recursion. What we went over is actually described on this page (different school though): http://www.bowdoin.edu/~ltoma/teaching/cs107/fall05/Labs/lab9.html I understand how the recursion works, but I'm more interested in determing the exact algorithm. I asked the professor, and he didn't know, except to say that it was "very inefficient" I toyed around with it a for a few minutes tonight, trying to determine the worse-case efficiency if all squares will filled in a playing field of x*y=n squares. I think I'm doing something wrong, because my initial figur ended up with 9n, which would be Big Oh n, which I'm sure can't be right; it must be more inefficient than that. Any ideas? Both on how to go about determining the algorithm and the actual algorithm itself.
[algogeeks] Re: for code4bill round2 participants
prick, don't you think you are slimming down your chances, by putting such a public message, which is read by Microsoft people also. ;-) Regards, [EMAIL PROTECTED]
[algogeeks] Re: puzzle from code4bill
int steps_combi(int steps) { if(steps==1) return 1; if(steps==2) return 2; // can take single step or double step return (steps_combi(steps-1) + steps_combi(steps-2)); }
[algogeeks] Re: Given an array containing both positive and negative integers, we r required to find the sub-array with the largest sum
Well, Here's a solution : Create an array of cumulative sums i.e. cs[i] = sum of elements from index 0 to i Now, find the maximum cumulative sum index say 'y'. We can exclude elements after index 'y' since they do not contribute positively to the cumulative sum. Also, let 'x' be the minimum cumulative sum point. Then we can ignore numbers from 0 to x (inlcuding x) since they do not contribute to the cumulative sum. So, the indices of the sub-array with the maximal sum should be (x+1, y) Thanks, Hemanth
[algogeeks] Re: for code4bill round2 participants
On 1/25/06, prick <[EMAIL PROTECTED]> wrote: > Hi everybody this is prick > I have just cleared round 1 of code4bill > I think we should help each other in round 2 > what do u say? ... that now I understand why Microsoft software is "as we know" ... if this is the way that they use to hire primary developers ...:) But if you win, who of us will work in Bill Gate's office ?! :) bye ! mattia.
[algogeeks] for code4bill round2 participants
Hi everybody this is prick I have just cleared round 1 of code4bill I think we should help each other in round 2 what do u say?