Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

### Suleyman.A's blog

By Suleyman.A, history, 2 years ago,

Hi, I want to know the time complexity of this code

#include <bits/stdc++.h>

#define N 100010

using namespace std;

int T[N*4];

int main()
{
memset(T, 0x3f3f3f3f, sizeof(T));
}


Many people say that memset's time complexity is O(logN), but my opinion is O(N).

Is O(logN) right? If not, is there any way to do that operation in O(logN)?

• +10

By Suleyman.A, 8 years ago,

I didn't find Cormen's "introduction to algorithms" book in russian.
Thanks

• +3

By Suleyman.A, 8 years ago,

I wonder what the infinite is. someone say that 1^infinite = 1 we don't know what the infinite is how it can be equal to 1 and I know 1^everything is = 1

• 0