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!
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
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...
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.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.