Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Question about book Learn Data Structures and Algorithms with Golang

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the Big O notation?
 
Author
Posts: 75
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Big O notation is defining an upper bound of an algorithm. it bounds a function only from above.  the time complexity of Insertion sort is O(n^2). O(n^2) covers linear time.
 
Sheriff
Posts: 22028
108
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
O(n^2) is not linear, that's O(n). O(n^2) is quadratic. See also https://en.wikipedia.org/wiki/Big_O_notation#Orders_of_common_functions.
 
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic