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?
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.
time-complexity big-o
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.
add a comment |
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.
time-complexity big-o
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 asc * f(n)for any constant valuecwithf(n) = 1, then you haveO(1)
– grek40
Mar 7 at 6:21
add a comment |
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.
time-complexity big-o
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
time-complexity big-o
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 asc * f(n)for any constant valuecwithf(n) = 1, then you haveO(1)
– grek40
Mar 7 at 6:21
add a comment |
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 asc * f(n)for any constant valuecwithf(n) = 1, then you haveO(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
add a comment |
1 Answer
1
active
oldest
votes
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.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
add a comment |
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.
add a comment |
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.
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.
answered Mar 7 at 6:24
Eric LippertEric Lippert
546k14610671951
546k14610671951
add a comment |
add a comment |
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 valuecwithf(n) = 1, then you haveO(1)– grek40
Mar 7 at 6:21