java - Big O notation (Complexity) -
java - Big O notation (Complexity) -
what big o of loop? -> understand loop going execute n times. task within of loop executes n times right? create o(n^2) or not combine them , simple o(n)? think o(n) because how many times loop executing clarification why or why not be? explanations helpful prepare midterm.
for(int = 0; < a.length;i++){ a[i] = b[i] }
think how many times code within loop executes. each a[i] = b[i] happens a.length times, phone call n. o(n).
java big-o complexity-theory
Comments
Post a Comment