asymptotic-complexity
<= vs < when proving big-o notation
We just started learning big-o in class. I understand the general concept that开发者_StackOverflow f(x) is big-o of g(x) if there exists two constants c,k such that for all x>k |f(x)|<=c|g(x)|. I h[详细]
2023-02-08 17:07 分类:问答time complexity of an algorithm
An algorith with size n=100 takes 21 seconds to run. With size n=1000 it takes 31 seconds and with n=10000 takes 41 seconds to run. What is the running complexity?[详细]
2023-02-08 03:17 分类:问答Asymptotically optimal algorithm to compute if a line intersects a convex polygon
An O(n) algorithm to detect if a line intersects a convex polygon consists in checking if any edge of the polygon开发者_运维问答 intersects the line, and look if the number of intersections is odd or[详细]
2023-01-31 19:24 分类:问答Measuring complexity for powering a number
I implemented a program for powering a number (a^n) using the divide and conquer technique. i implemented two versions of the same problem:[详细]
2023-01-28 20:32 分类:问答Big-Oh, Concequence of a Definition
I have spent a lot of time reading questions and answers about Big-Oh on both here and math.stackexchange and seems that this is the best place for it as math.stackexchange don\'t seem to like questio[详细]
2023-01-27 13:12 分类:问答In Asymptotic Analysis, Show That :- O( f(n) + g(n) ) = O( max{ f(n) , g(n) } ) [closed]
开发者_如何学JAVAIt's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for[详细]
2023-01-26 05:31 分类:问答Worst case vs O(n)
Is there a difference between statement \"Worst case running time of an Al开发者_运维技巧gorithm A\" and \"Running time of an Algorithm A is O(n)\"?[详细]
2023-01-23 09:57 分类:问答Fundamentals and maths required for algorithms
I have been working on RTOS and Linux driver development for quite some time. Now I aminterviewing at semiconductor companies and failing to answer questions about algorithms on strings, and time and[详细]
2023-01-20 07:57 分类:问答Function which is Big O(1) but not Ω(1)
Can some help me with a function which is Big O(1) but not Ω(1) and the other way around? Some explanation would greatly he开发者_JAVA百科lp.Big-O means <= and big Omega means >=, so a function th[详细]
2023-01-17 21:21 分类:问答How can I find a number which occurs an odd number of times in a SORTED array in O(n) time?
I have a question and I tried to think over it again and again... but got nothing so posting the question here. Maybe I could get some view-point of others, to try and make it work...[详细]
2023-01-06 06:29 分类:问答