Suleyman.A's blog

By Suleyman.A, history, 17 months ago, In English

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)?

Please write your opinions.

Read more »

 
 
 
 
  • Vote: I like it
  • +10
  • Vote: I do not like it

By Suleyman.A, 7 years ago, In English

I didn't find Cormen's "introduction to algorithms" book in russian.
Please give me the link to download this book.
Thanks

Read more »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

By Suleyman.A, 8 years ago, In English

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
Please help, thanks.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it