This isn't actually homework, but I need to understand these concepts in the class.

What is the worst-case Big-O performance for the insert, find and remove operations in a general tree? Why is this so?

I have no idea how to approach that one, since there are no constrictions on general trees.

Which grows faster, O(n^2*log(n)) or O(n^1.01)

O(n^{2 log n}) grows much much faster than O(n^{1.01}). I am assuming the base of the logarithm is 2 as in case of many Tree algorithms.

For example consider the case when n=1024.

n^{2 log n} = 1024 ^{2 * log 1024} =1024^{20}=1606938044258990275541962092341162602522202993782792835301376.

Where as n^{1.01}=1024^{1.01}=1097.5

Similar Questions

Please excuse the intentional verbosity Here is a small program excerpt: for i=1 to n j= 0; while(j<=n); j=j+1; If I have to find the complexity(Big O) of this code: I'll first count how many time

can anyone help me verifying the following complexities: 10^12 = O(1)? 2^(n+3) + log(n) = O(2^n)? f(n) = Omega(n) and f(n) = theta(n) <=> f(n) = O(n) thanks

Is it the same as saying O(max(M,N))? I am learning time complexity and this type of complexity comes up time and again with graphs.I don't fully understand what they mean by O(M+N), where M=numbe

while (n >= 1) n /= 2; I am unable to get the Big-O notation for this

If I have a function of: for(i=0;i<n;i++) for(j=0;j<i*i;j++) for(k=0;k<j;k++) System.out.println(k); Would the big O of this function be n^5 from having: n*((n-1)^2)*((n-1)^2)-1?

How to decide on expressing time complexity of algorithm ? Should we choose to express time complexity in terms of O(n) or theta(n) ? Because a function f(n) can be expressed as either Big-Oh(g(n)) o

I'm new to Big-O notation, so I need a little advice. Say I have a choice of two algorithms: one with several for loops in a row, or one with a thrice nested for loop. For example, one is structured s

What's the big-O complexity for the following loop: for each vertex u ∈ C do for each vertex v ∈ C and v > u do What I'm doing here is imagine the following set {1,2,3,4} the loop executes a funct

This question already has an answer here: What does O(log n) mean exactly? 25 answers Like the Big O notation O(1) can describe following code: O(1): for (int i = 0; i < 10; i++) { // do

for(int i=N; i>0; i=i/2) irrelevant statement; I am asked to find the complexity class and I am unsure of whether I am supposed to use Big-Omega notation or Big-O? But I am assuming that it is O(N

I've got a few questions in regards to the EF 4.0 which I hope someone can help me with. A little bit of background first: I used a tool from visualstudiogallery.com to reverse engineer my database in

Ok, I am trying to understand the concept of Big O. I have a function I am suppose to find the Big O and I am not quite getting it this is an example in the book of one that is like my homework.. I

While I understand the concept of both complexity of algorithms and logarithmic complexity in programming, I do not know how to determine the complexity of a logarithm that includes variables of diffe

How do you compute the number of operations each line of code would take. Example. Algorithm find2D (A,x) arrLength = A.length for j <- 1 to arrLength – 1 do for k <- 1 to arrLength – 1 do if A[

I've computed complexity of below algorithm as for i = 0 to m for j = 0 to n //Process of O(1) Complexity: O( m * n) This is simple example of O( m * n). But I'm not able to figure out how O(m+n) co

Problem What is this algorithm doing? What does 0x01 represent? What does it mean that m = m >> 1 within the inner while loop? What is this algorithm big-O of? while(n>0) { m = n; while(m) {

I want to implement at least two different solutions to find N-th largest element with O(N*log(N)) average time complexity in Big-O notation, where N is the number of elements in the list ? which sea

I read about Big-O Notation from here and had few questions on calculating the complexity.So for the below code i have calculated the complexity. need your inputs for the same. private void reverse(S

I'm kind of new to threading in C# and had a couple of questions about what is out there: What are the ways to implement threads in C#? (i.e. I can think of two off the top: backgroundWorker, Thread,

I've recently started using LINQ quite a bit, and I haven't really seen any mention of run-time complexity for any of the LINQ methods. Obviously, there are many factors at play here, so let's restric

On a recent exam, we were given a function to count how many doubles (not the primitive double, but how many times an item appears twice) appear in an unsorted ArrayList. I correctly determined that t

I got this question wrong on an exam : Name a function that is neither O(n) nor Omega(n). After attempting to learn this stuff on my own through youtube, I'm thinking this may be a correct answer: (n

I am trying to traverse a general tree in prolog in a postorder way. I found a lot of binary tree postorder traversals but could not use them to my purpose. I wrote a program but it only prints my tre

I'm having problems calculating Big O for the following code. Im never the smartest cookie. Can someone kindly explain it. My guess here was O(N^2) due to the nested loops but I know there's more to i

Possible Duplicate: Are there any O(1/n) algorithms? This just popped in my head for no particular reason, and I suppose it's a strange question. Are there any known algorithms or problems which act

Can some body given a simple program or algorithm whose Time complexity is O(max(m,n)). I am trying to understand asymptotic notations. I followed some tutorials and understood what they have explaine

I am working on some revision at the moment and specifically going over Big-O notation. I have asked a similar question (which dealt with a different algorithm) but am still unsure if I am going the r

I'm practicing for an upcoming test by completing past tests. One of the questions asks me to determine the worst-case time complexity (in Big-O) for an algorithm. I am unsure of the correctness of my

What is the Big-O time complexity of the count() function for arrays? Example $x = array(1,2,3); echo count($x); // how many operation does it takes to count the elements // of the array? is it 3, or

Some standard books on Algorithms produce this: 0 ≤ f(n) ≤ c⋅g(n) for all n > n0 While defining big-O, can anyone explain to me what this means, using a strong example which can help me to visual

I just have some basic questions about the way shared preferences work with Android: 1) Are the preference files part of the application itself, or are they stored elsewhere on the user's phone? 2) If

Out of these algorithms, I know Alg1 is the fastest, since it is n squared. Next would be Alg4 since it is n cubed, and then Alg2 is probably the slowest since it is 2^n (which is supposed to have a v

Does anyone know the time complexity of the operations of TreeMap like - subMap, headMap. tailMap. The time complexity of operations like get, put is O(logn). But the javadoc doesnt say much about the

For Example O(n) for (int i=0;i<n;i++) After Edit : My Final Answer is for(int i =(n - 1); i > 1; i--) { factorial = factorial * i; } for (int j=n-2;j<factorial;j++) { }

I'm trying to determine the time complexity of the following: while loop that executes n! times { perform an operation that is O(n) } Would the big-o analysis still be O(n!)? I don't see how it would

I need to derive the Big-O complexity of this expression: c^n + n*(log(n))^2 + (10*n)^c where c is a constant and n is a variable. I'm pretty sure I understand how to derive the Big-O complexity of

What is the time complexity of the implementation of a binary tree traversal below? void Tree::nonRecInOrder() { // nonrecursive inOrder Traversal using Stack Stack< TreeNode* > s ; // declare a

What are the space and time complexities, in Big O notation, for the Lempel-Ziv-Welch and Huffman compression algorithms? Google is failing me. Thanks, Francisco

I had a question about Big O vs little o notation. It seems intuitively, that Big O is like <= while little o is like <. Does that mean that if something is little o of f(n), it is also Big O of

What is the Big O for the zig-zag merge join algorithm? GAE's Big Table uses it, they go into it in these videos: http://www.youtube.com/watch?v=AgaL6NGpkB8 http://www.bestechvideos.com/tag/zigzag-me

This question already has an answer here: Plain English explanation of Big O 21 answers What is Big O notation? Do you use it? I missed this university class I guess :D Does anyone use it and g

I'm trying to get my head around the calculation of time complexity of my own method - can anybody nudge me in the direction of calculating a method involving a for each method which involves a recurs

What is the complexity of inserting into sorted link list in big-O notation? Let say I have 5 elements and what is the complexity to insert all of them. Thank you very much

I have some general questions about the use of Font Awesome with Twitter Bootstrap. I used the LESS integration method described on their website. I thought it was an iconic font. So why does it ch

What is the big-O complexity of the function (log n)k for any k?

int a = 3; while (a <= n) a = a*a; My version is that its complexity is: Is there such a thing?

I think this is probably a beginner question about big-O notation. Say, for example, I have an algorithm that breaks apart an entire list recursively(O(n)) and then puts it back together (O(n)). I ass

Today i was told to create tree data structure with the below class, public class Node(){ private string lable; private List<Node> children; } After started to create the tree, i struck at very

So given the following program: Is the time complexity of this program O(0)? In other words, is 0 O(0)? I thought answering this in a separate question would shed some light on this question. EDIT: Lo

What is the time complexity for a clear function is std::map? Would I be right in saying that it is O(1)?