Time complexity of Memset in C++

Правка en2, от Suleyman.A, 2020-05-20 14:56:15

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.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Suleyman.A 2020-05-20 14:57:26 16
en2 Английский Suleyman.A 2020-05-20 14:56:15 4
en1 Английский Suleyman.A 2020-05-20 14:55:23 424 Initial revision (published)