Jump to content

gate13

Members
  • Posts

    15
  • Joined

  • Last visited

gate13's Achievements

Quark

Quark (2/13)

-2

Reputation

  1. 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. 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
  3. Yes, this is a topic in one of my computer science classes..... did you know math and computer sicence were related? lol
  4. Sensei, you are off the topic!sorry! timo!!!! all the letters are X and Y... They are all capital! Never mind guys!
  5. 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
  6. 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...
  7. well i gave an example, what part of my question you don't understand...?
  8. 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.
×
×
  • Create New...

Important Information

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.