complexity-theory
Complexity (beginner question)
What is the开发者_如何学编程 complexity of these statements? for(int k = 1; k < n; k++) for(int i = 0; i < n-k; i++){[详细]
2023-03-05 17:12 分类:问答Time Complexity of std::multimap::equal_range
Good afternoon, I am wondering what the time complexity of std::multimap::equal_range is? Is it Big-O(n) or BIG-0(log n). I remember reading that the time 开发者_如何学运维complexity of std::multimap:[详细]
2023-03-05 06:03 分类:问答String analysis
Given a sequence of operations: a*b*a*b*a*a*b*a*b is there a way to get the optimal subdivision to enable reusage of substring.[详细]
2023-03-05 03:23 分类:问答Complexity of string combination algorithm (as recursive)
I have a method like the following: How can I calcu开发者_JAVA百科late the Big-O? O(2n) or O(nn)??[详细]
2023-03-04 12:05 分类:问答Given a char array with words in it, find all 'a' characters and replace with xyz. Modify the input array, do not create a copy of the array
This is an interview question. I wanted to know if instead of \'a\' we 开发者_运维知识库want to replace \'xyz\' does that mean we have to create 2 extra space or can I increase the size at that partic[详细]
2023-03-03 16:02 分类:问答What's the Time Complexity of Average Regex algorithms?
I\'m not new to using regular expressions, and I understand the basic theory they\'re based on--finite state machines.[详细]
2023-03-03 03:28 分类:问答how long for a BWT process usually take
I know the time complexity is of O(n^2) but anyone knows how long does it generally take in practice , 开发者_JAVA百科with the most common available method that is adopted these days, to transform a,[详细]
2023-03-03 02:03 分类:问答f(n)=n^log(n) complexity polynomial or exponential
I\'m trying to figure out whether f(n)=n^(logb(n)) is in Theta(n^k) and therefore grows polynomial or in Theta(k^n) and therefore grows exponentially.[详细]
2023-03-02 04:24 分类:问答What does Logn actually mean?
I am just studying for my class in Algorithms and have been looking over QuickSort. I understand the algorithm and how it works, but not how to get the number of comparisons it does, or what logn actu[详细]
2023-03-02 02:32 分类:问答Complexity of recursive algorithm
I have an algorithm, and I would like to find out the complexity of it, but there is recursion, and I don\'t know how to count with recursion. My code is:[详细]
2023-02-27 13:33 分类:问答