Search:

Type: Posts; User: blackvelvet

Search: Search took 0.00 seconds.

  1. I'm confused:confused: It seems like everyone is...

    I'm confused:confused: It seems like everyone is giving a different answer
  2. So it should be like this...? unsigned...

    So it should be like this...?



    unsigned rnd(unsigned limit)
    {
    return rand() % limit; // O(1)
    }

    void permute (int a[], int n)
  3. Is this the correct big O average case complexity for this algorithm?

    unsigned rnd(unsigned limit)
    {
    return rand() % limit; // O(1)
    }

    void permute (int a[], int n)
    {
    bool* used = new bool[n]; // O(1)
    fill (used, used+n, false); ...
Results 1 to 3 of 3