big-o
Speed-up and best practices: Using ets for per-module pre-computed data
((Please forgive me that I ask more than one question in a single thread. I think they are related.))[详细]
2023-03-09 15:02 分类:问答what is the time complexity of this code? [closed]
It'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 form. For help clari[详细]
2023-03-09 13:47 分类:问答Time Complexity of Doubly Linked List Element Removal?
A lot of what I\'m reading says that removing an internal element in a doubly linked list (DLL) is O(1); but why is this the case?[详细]
2023-03-09 10:01 分类:问答Big Theta problem
I have two functions: f(n) = 2; g(n) = 10 ^ 100; I have to justify if f(n) = BigTheta(g(n)) or not. My guess is that f(n) is BigTheta(g(n)), since both functions are constants (wich means the fu[详细]
2023-03-09 02:40 分类:问答Time complexity of this code sample
i=n; while (i>=1) { --x=x+1; --i=i/2; } What is the running time of this code? A O(N^2) B O(N^3)开发者_Go百科[详细]
2023-03-08 17:58 分类:问答How do I get the element with the smallest key in a collection, in O(1) or O(log n) time?
I know that I can use a Dictionary and retrieve an arbitrary element in O(1) time. I know that I can get the next highest (or lowest) element in a SortedDictionary in O(1) time.But what if I wanted t[详细]
2023-03-08 15:40 分类:问答What's the efficiency of this program?
What\'s the efficiency (in Big O notation) of a simple program that traverses a 2D array of ints and outputs each element.[详细]
2023-03-07 16:33 分类:问答Best algorithm for delete duplicates in array of strings
Today at school the teacher asked us to implement a duplicate-deletion algorithm. It\'s not that difficult, and everyone came up with the following solution (pseudocode):[详细]
2023-03-07 12:31 分类:问答how to show that 5n=O(nlogn)
I have this as a 开发者_如何学编程homework question and don\'t remember learning it in class. Can someone point me in the right direction or have documentation on how to solve these types of problems?[详细]
2023-03-06 20:46 分类:问答Running time and memory
If you cannot see the code of a function, but know that it takes arguments.Is it possible to开发者_JAVA技巧 find the running time speed and memory.If so how would you do it.Is there a way to use Big O[详细]
2023-03-06 03:06 分类:问答