Jump to content
gate13

about time complexity

Recommended Posts

Explain to me why anything takes longer than constant time to run.

Share this post


Link to post
Share on other sites

Explain to me why anything takes longer than constant time to run.

 

Because sorting a longer list, for example, takes more time than a short list. How much longer depends on the sort algorithm.

A quick question:

If f(n) = log n, and g(n) = square root of n , which is the best description for the time complexity???

would it be

g(n) = O(f(n)) ?

 

Are you asking about the time complexity of log(n) and sqrt(n)? If so, I'm not sure it is possible to answer this without knowing how they are implemented. If not, I'm not sure what the question is ....

Share this post


Link to post
Share on other sites

i AM LOST!

 

Do you understand what time complexity is?

What function do you want to calculate the time complexity of?

 

Perhaps you could clarify the question you are asking.

Share this post


Link to post
Share on other sites

never mind I solved it

 

!

Moderator Note

Please don't EVER delete your OP like that again. Thread closed, sorry to future readers who might have learned something, if they knew what the question was.

.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.