time-complexity
Very hard sorting algorithm problem - O(n) time - Time complextiy
Since the problem is long i can not describe it开发者_运维技巧 at title. Imagine that we have 2 unsorted integer arrays. Both array lenght is n and they are containing interegers between 0 - n^765 ([详细]
2023-01-31 15:34 分类:问答What is the time complexity of std::sort() in the C++ standard library?
What is the complexity of std::sort() in the C++ St开发者_JS百科andard Library? Which sort is applied? Is there any rule of applying any particular sorting algorithm there?Before C++11:[详细]
2023-01-31 14:02 分类:问答What is the proper problem name / algorithm for this problem description in computer science theory?
The problem is that I have X items of varying weighted values that must go into Y containers. The containers are of differing sizes (e.g. hold differing maximum weights). The total load of each contai[详细]
2023-01-30 14:31 分类:问答time complexity
Hi I have a question that: consider I have T(n) = m * n^2(n<m) is this correct to write T(n) = O(m) ?because I have written T(n) = m*n*n So bec开发者_开发技巧ause n<m we have T(n) = O(m)[详细]
2023-01-29 10:53 分类:问答Find the majority element in array
The majority element is the element that occurs more than half of the size of the array. How to find the majority element in an array in开发者_StackOverflow中文版 O(n)?[详细]
2023-01-28 13:32 分类:问答Stack Complexity [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 for[详细]
2023-01-27 23:12 分类:问答How to improve performance of this code?
Thanks to some help from people here, I was able to get my code for Tasmanian camels puzzle working. However, it is horribly slow (I think. I\'m not sure because this is my first program in Python). T[详细]
2023-01-27 11:46 分类:问答time complexity of this while loop
Hi I have written such a this code and I want to know that : its time complexity is O(n) ? DNode header = new DNode(null, null, null);[详细]
2023-01-26 11:19 分类:问答Most efficient way to search a sorted matrix?
I have an assignment to write an algorithm (not in any particular language, just pseudo-code) that receives a matrix [size: M x N] that is sorted in a way that all of it\'s rows are sorted and all of[详细]
2023-01-24 19:44 分类:问答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 分类:问答