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

Popular posts from this blog

php - How to pass multiple values from url -

php - Laravel not returning controller -

c# - Confused on how to specify a Platform and Version while using ChromeOptions for RemoteWebDriver with Selenium donNet since recent updates -