Is there a way to generate all of the subset sums s1, s2, ..., sk that fall in a range [A,B] faster than O((k+N)*2N/2), where k is the number of sums there are in [A,B]? Note that k is only known afte
How to remove blank spaces in a string with a complexity of O(n). My approach is using two indexes. One will traverse till length on string. Other will be incremented only when a non-blank character
Few more problems I ran into calculating the Big-oh complexity. There are 2 problems which I cannot solve due to log base operations. Here are the two problems:
Binary search has a average case performance as O(log n) and Quick Sort with O(n log n) is O(n log n开发者_如何学C) is same as O(n) + O(log n)Imagine a database with with every person in the world. Th
I\'m using .NET 4\'s System.Numerics.BigInteger structure. I need to calculate the square (x2) of very large numbers - millions of decimal digits.
If LinkedHashMap\'s ti开发者_StackOverflowme complexity is same as HashMap\'s complexity why do we need HashMap? What are all the extra overhead LinkedHashMap has when compared to HashMap in Java?Link
I\'m still learning about complexity measurement using the Big O Notation, was wondering if I\'m correct to say that following method\'s complexity is O(n*log4n), where the \"4\" is a subscript.
I would like to know the complexity (as in O(...) ) of the following sorting algorithm: There are B barrels
This question already has answers here: Closed 12 years ago. Possible Duplicate: Interview Q: given an array of numbers, return array of products of all other numbers (no division)
Swanepoel\'s comment here lead me to this paper. Then, searching for an implementation in C, I came across this, which referenced another paper on an algorithm described here.