This content has been marked as final.
Show 10 replies

1. Re: complexity of an algorithm
3004 Feb 24, 2009 5:23 PM (in response to 843785)And this has what to do with Java?
(HINT: The answer rhymes with "nothing.") 
2. Re: complexity of an algorithm
843785 Feb 24, 2009 5:40 PM (in response to 3004)Muffin rhymes with nuffin' 
3. Re: complexity of an algorithm
843785 Feb 24, 2009 5:42 PM (in response to 843785)DrLaszloJamf wrote:
Puffin (which is kind of an awk; at least that's what Wikipedia sed).
Muffin rhymes with nuffin'
~ 
4. Re: complexity of an algorithm
843785 Feb 24, 2009 5:47 PM (in response to 843785)I have a yearold puffin
I keep it as a pet.
I feel it dayold muffin
And keep it from the wet.
And although I'd like to toughen
It, and teach it Java complexity
I worry there's positively nuffin'
To deal with its perplexity! 
5. Re: complexity of an algorithm
800282 Feb 24, 2009 6:28 PM (in response to 843785)doobybug wrote:
Have you any idea yourself? Explaining what you yourself think (or have thought of), will go a long way in a public forum. It now looks like you didn't give it any thoughts of yourself and are hoping that someone else will do this for you. Before you go into a "don't assume that I..."mode, note the words "looks like" in my post.
Hi guys,
I don't know whether somebody can help me. I have 2 algorithms and I need to find their best and worst case in terms of the big O notation.
... 
6. Re: complexity of an algorithm
843785 Feb 25, 2009 12:57 AM (in response to 843785)doobybug wrote:
Very simple. The worst case for the first is O(n*n) and for the second it's O(n). It's because of the looping.
Hi guys,
I don't know whether somebody can help me. I have 2 algorithms and I need to find their best and worst case in terms of the big O notation.
The first 1 is:
for(i = 0; i < = n; i++){
for(j = 0; j < = n; j++){
C[i,j] = A[i,j] + B[i,j]
}
}
The second 1 is:
while (n > = 1){
The best case is the same as the worst case unless any of the algorithms can "break" out prematurely. 
7. Re: complexity of an algorithm
3004 Feb 25, 2009 2:43 AM (in response to 843785)Way to spare the OP the horror of thinking for himself, uj. 
8. Re: complexity of an algorithm
843785 Feb 25, 2009 3:35 AM (in response to 3004)jverd wrote:
uj????
Way to spare the OP the horror of thinking for himself, uj.
The OP came here for advice, not to suffer what's on your mind.
Besides, I just offered a pointer. 
9. Re: complexity of an algorithm
843785 Feb 25, 2009 6:33 AM (in response to 843785)if you have to ask how complex an algorithm is it's too complex for you to comprehend >:=) 
10. Re: complexity of an algorithm
843785 Feb 25, 2009 7:21 AM (in response to 843785)Sorry, but the second one is not defined as long as you don't know how n changes