Big O notation of a constant larger than 1 [duplicate]Why do we prefer not to specify the constant factor in Big-O notation?Big O, how do you calculate/approximate it?What is a plain English explanation of “Big O” notation?Is a Java hashmap really O(1)?Difference between Big-O and Little-O NotationWhat does O(log n) mean exactly?List of Big-O for PHP functionsAre 2^n and n*2^n in the same time complexity?Meaning of Big O notationGot lost while reading about Big O NotationWhy do we prefer not to specify the constant factor in Big-O notation?

Open a doc from terminal, but not by its name

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

Temporarily disable WLAN internet access for children, but allow it for adults

What exact color does ozone gas have?

Unexpected behavior of the procedure `Area` on the object 'Polygon'

Why did the EU agree to delay the Brexit deadline?

An unused reference in research paper

Why does the Sun have different day lengths, but not the gas giants?

Does the Linux kernel need a file system to run?

Calculate sum of polynomial roots

Strong empirical falsification of quantum mechanics based on vacuum energy density

Is there a RAID 0 Equivalent for RAM?

Add big quotation marks inside my colorbox

PTIJ: Haman's bad computer

What if a revenant (monster) gains fire resistance?

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

Multiplicative persistence

Pre-mixing cryogenic fuels and using only one fuel tank

How could a planet have erratic days?

Is aluminum electrical wire used on aircraft?

Quoting Keynes in a lecture

What is Cash Advance APR?

It grows, but water kills it

What if you are holding an Iron Flask with a demon inside and walk into Antimagic Field?



Big O notation of a constant larger than 1 [duplicate]


Why do we prefer not to specify the constant factor in Big-O notation?Big O, how do you calculate/approximate it?What is a plain English explanation of “Big O” notation?Is a Java hashmap really O(1)?Difference between Big-O and Little-O NotationWhat does O(log n) mean exactly?List of Big-O for PHP functionsAre 2^n and n*2^n in the same time complexity?Meaning of Big O notationGot lost while reading about Big O NotationWhy do we prefer not to specify the constant factor in Big-O notation?













0
















This question already has an answer here:



  • Why do we prefer not to specify the constant factor in Big-O notation?

    1 answer



Does it mean anything at all to have a function with time complexity O(2)?



For example, how would one describe a function that must check two lookup tables rather than one. Is that not strictly describable in big-O, or is O(2) a real way to describe this? Or something else?



Thanks.










share|improve this question













marked as duplicate by grek40, Wai Ha Lee, Community Mar 7 at 6:47


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • O(n + m) with n/m being the length of the two lookup tables, respectively

    – Josue Espinosa
    Mar 7 at 6:19











  • Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

    – grek40
    Mar 7 at 6:21















0
















This question already has an answer here:



  • Why do we prefer not to specify the constant factor in Big-O notation?

    1 answer



Does it mean anything at all to have a function with time complexity O(2)?



For example, how would one describe a function that must check two lookup tables rather than one. Is that not strictly describable in big-O, or is O(2) a real way to describe this? Or something else?



Thanks.










share|improve this question













marked as duplicate by grek40, Wai Ha Lee, Community Mar 7 at 6:47


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


















  • O(n + m) with n/m being the length of the two lookup tables, respectively

    – Josue Espinosa
    Mar 7 at 6:19











  • Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

    – grek40
    Mar 7 at 6:21













0












0








0









This question already has an answer here:



  • Why do we prefer not to specify the constant factor in Big-O notation?

    1 answer



Does it mean anything at all to have a function with time complexity O(2)?



For example, how would one describe a function that must check two lookup tables rather than one. Is that not strictly describable in big-O, or is O(2) a real way to describe this? Or something else?



Thanks.










share|improve this question















This question already has an answer here:



  • Why do we prefer not to specify the constant factor in Big-O notation?

    1 answer



Does it mean anything at all to have a function with time complexity O(2)?



For example, how would one describe a function that must check two lookup tables rather than one. Is that not strictly describable in big-O, or is O(2) a real way to describe this? Or something else?



Thanks.





This question already has an answer here:



  • Why do we prefer not to specify the constant factor in Big-O notation?

    1 answer







time-complexity big-o






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 6:17









dlarkrdlarkr

33




33




marked as duplicate by grek40, Wai Ha Lee, Community Mar 7 at 6:47


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by grek40, Wai Ha Lee, Community Mar 7 at 6:47


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • O(n + m) with n/m being the length of the two lookup tables, respectively

    – Josue Espinosa
    Mar 7 at 6:19











  • Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

    – grek40
    Mar 7 at 6:21

















  • O(n + m) with n/m being the length of the two lookup tables, respectively

    – Josue Espinosa
    Mar 7 at 6:19











  • Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

    – grek40
    Mar 7 at 6:21
















O(n + m) with n/m being the length of the two lookup tables, respectively

– Josue Espinosa
Mar 7 at 6:19





O(n + m) with n/m being the length of the two lookup tables, respectively

– Josue Espinosa
Mar 7 at 6:19













Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

– grek40
Mar 7 at 6:21





Big-O notation abstracts away constant multipliers. So if your complexity can be described as c * f(n) for any constant value c with f(n) = 1, then you have O(1)

– grek40
Mar 7 at 6:21












1 Answer
1






active

oldest

votes


















3














O(something) is a set of functions.



O(1) and O(2) are the same set.



A constant time function is a member of O(1). It's also a member of O(2) because O(1) and O(2) are exactly the same thing. Use whichever one you prefer. Normally you'd use O(1), but you be you.






share|improve this answer





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    O(something) is a set of functions.



    O(1) and O(2) are the same set.



    A constant time function is a member of O(1). It's also a member of O(2) because O(1) and O(2) are exactly the same thing. Use whichever one you prefer. Normally you'd use O(1), but you be you.






    share|improve this answer



























      3














      O(something) is a set of functions.



      O(1) and O(2) are the same set.



      A constant time function is a member of O(1). It's also a member of O(2) because O(1) and O(2) are exactly the same thing. Use whichever one you prefer. Normally you'd use O(1), but you be you.






      share|improve this answer

























        3












        3








        3







        O(something) is a set of functions.



        O(1) and O(2) are the same set.



        A constant time function is a member of O(1). It's also a member of O(2) because O(1) and O(2) are exactly the same thing. Use whichever one you prefer. Normally you'd use O(1), but you be you.






        share|improve this answer













        O(something) is a set of functions.



        O(1) and O(2) are the same set.



        A constant time function is a member of O(1). It's also a member of O(2) because O(1) and O(2) are exactly the same thing. Use whichever one you prefer. Normally you'd use O(1), but you be you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 6:24









        Eric LippertEric Lippert

        546k14610671951




        546k14610671951















            Popular posts from this blog

            AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

            Алба-Юлія

            Захаров Федір Захарович