In Big O notation, allocate an array of N element is defined by O(1) or O(n) ? For example in C#, if I allocate an array like this :

int[] a = new int[10]

When I display this array, I have :

{0,0,0,0,0,0,0,0,0,0}

Related posts

Recent Viewed