[algogeeks] Re: Sum of sub array

2006-01-05 Thread Vikram Venkatesan
I agree with phoenixinter... whats the problem with that?? its the obvious solution, provided O(n) precomputation time... Abhi, can you explain whether there is any problem with that solution??

[algogeeks] Evaluate an expresion

2006-01-05 Thread ridvansg
Hi All, may someone advise me for an algorithm for validateing and evaluating a function like this: finction(par1, par2, par3){ if(par15 and ...){ par2=par2*1.1; } else{ . } } the function will contaim only if else

[algogeeks] Re: Cashbox withdrawal

2006-01-05 Thread kestrel
Yes, you are right but this is not an efficient solution. It runs in O(n*S) time and S in my case is sufficiently large. What I have noticed that the greedy algorithm works indeed in most of the cases. If there is at least one single number of each denomination, the greedy algorithm will work