Arrays.fill complexity in java -


how arrays.fill(char[] a,char val) implemented internally in java?

and complexity of it?

if definition of fill(char[] a, char val) available in java.util.arrays class.

it such this

public static void fill(object[] a, object val) {         (int = 0, len = a.length; < len; i++) //this loop continues length of a.             a[i] = val;     } 

so, complexity method o(n). n length of object array object[] a passed parameter.


Comments

Popular posts from this blog

ios - Memory not freeing up after popping viewcontroller using ARC -

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -