# gate13

Members

15

-2 Poor

• Rank
Quark
1. ## Big O notation for a small code segment

What is the running time order of the following code fragment? int sum = 0; for(int i=0; i<10; i++) for(int j=0; j<N; j++) for(int k=N-2; k<N+2; k++) sum = sum + k; Is it O(N^2)?I am so sure!
2. ## recursive algorithm order

Running time T(n), where n is input size of recursive algorithm is given as follows T(n) = A + T(n-1), if n > 2, T(n) = d if n<=1. wi

i AM LOST!

never mind I solved it
5. ## P(X≠Y) question about probability and union

Yes, this is a topic in one of my computer science classes..... did you know math and computer sicence were related? lol
6. ## P(X≠Y) question about probability and union

Sensei, you are off the topic!sorry! timo!!!! all the letters are X and Y... They are all capital! Never mind guys!
7. ## P(X≠Y) question about probability and union

hi i have a table and one of the questions is P(X≠Y) I am so confused! does this mean is the same as Pr[X∪Y ] which means : Pr[X⋃Y ]=Pr[X]+Pr[Y]-Pr[X ∩ Y] Please help ! for example the table is something like that: y x 1 2 3 4 1 0.02 0.02 0.02 0.04 2 0.04 0.04 0.04 0.08 3 0.14 0.14 0.14 0.28

yes

lost

lost!

so lost!
12. ## quick sort algorithm and median of three partitioning

thank you for your answer actually the sequence was very large these 4 elements is what is left.. i have a cutoff of three (so 3 or less items will not use the method) But this last sequence of 4 elements gives me so many problems because i don't know where the i starts and where the j starts after moving the pivot 15 to the second to the last position bit fiveworlds, I think you answered my question and this how i processed it... Thank you...
13. ## quick sort algorithm and median of three partitioning

well i gave an example, what part of my question you don't understand...?
14. ## quick sort algorithm and median of three partitioning

Hi. I have a small sequence of 4 elements that i need to apply the median of three partitioning quick sort algorithm I know how to do it with long sequences but here is my problem. the sequence is { 7, 17, 15, 19} the pivot is 15 what the i and what the j is? I am so confused. with many elements is easy to do the quick sort and the method of median of three but what about this case? can i and j be 15 at the same time? so confused.
×