### Big O, how do you calculate/approximate it?

Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity...

Most people with a degree in CS will certainly know what Big O stands for. It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity...

Apparently ;-) the standard containers provide some form of guarantees. What type of guarantees and what exactly are the differences between the different types of container? Working from the SGI...

I wonder whether there is any automatic way of determining (at least roughly) the Big-O time complexity of a given function? If I graphed an O(n) function vs. an O(n lg n) function I think I would...

I have seen this term "O(1) access time" used to mean "quickly" but I don't understand what it means. The other term that I see with it in the same context is "O(n) access time". Could someone...

Whenever I consider algorithms/data structures I tend to replace the log(N) parts by constants. Oh, I know log(N) diverges - but does it matter in real world applications? log(infinity) < 100 ...

Here is the problem that tagged as dynamic-programming (Given a number N, find the number of ways to write it as a sum of two or more consecutive integers) and example 15 = 7+8, 1+2+3+4+5, 4+5+6 I...

Is there a list of the different data structures and their big-O access times for Python? I was rummaging through the standard library docs and didn't see any, hence the question. :-)

I would like to create a string buffer to do lots of processing, format and finally write the buffer in a text file using a C-style sprintf functionality in Python. Because of conditional...

I'm referring to this: http://docs.python.org/tutorial/datastructures.html What would be the running time of list.index(x) function in terms of Big O notation?

I always thought the complexity of: 1 + 2 + 3 + ... + n is O(n), and summing two n by n matrices would be O(n^2). But today I read from a textbook, "by the formula for the sum of the first n...

Can someone help explain how can building a heap be O(n) complexity? Inserting an item into a heap is O(log n), and the insert is repeated n/2 times (the remainder are leaves, and can't violate...

I have a question regarding time complexity (big O notation) for Java software. Is there a way to quickly calculate or test it (or any website that could calculate it for me would be welcomed). ...

I have an array of strings, each one with a different length. e.g: s[0] = "sSWXk" s[1] = "qCk" s[2] = "sOQQXPbk" . . . s[x] = "KVfdQk"; I also am given that n = s[0].length() + s[1].length() +...

I've read that operations such as addition/subtraction were linear time, and that "grade-school" long multiplication is n^2 time. Why is this true? Isn't addition floor(log n) times, when n is the...

I am reading the book Artificial Intelligence: A Modern Approach. I came across this sentence describing the time complexity of uniform cost search: Uniform-cost search is guided by path costs...

I have a sorted ArrayList of integers. Now I have a new integer to insert into the ArrayList. This new integer has to be inserted at the appropriate position to keep the ArrayList in sorted...

I was playing around with binary serialization and deserialization in Rust and noticed that binary deserialization is several orders of magnitude slower than with Java. To eliminate the...

So I can picture what an algorithm is that has a complexity of n^c, just the number of nested for loops. for (var i = 0; i < dataset.len; i++ { for (var j = 0; j < dataset.len; j++) { ...

I have a big file (attribute file) in my Amazon S3 bucket in .zip form. It is around 30 gb when unzipped. The file is updated every 2 days. INDEX HIEGHT GENDER AGE 00125 155 MALE 15 01002 161...

I'm writing a program where I have to determine the growth rate of some code. It might be run like this: python3 my_program.py program_with_code_to_test Here is where I am stuck: The executable...

I am using Rcpp to integrate C++ code into an R-package. After compiling, I see that the *.o files are huge (~2Mb), while the original *.cpp and *.h files are only ~20kb. Where does this...

I got 2 nested for loops, I calculate a new value for nrResults on every execution of the inner for loop (which will loop nnrResults - 2 times). The time complexity should be of order O(n), since...

I need to do Fix&Optimize heuristic and I need fix the last value of some variables but without adition constrain because the problem is big and more constrain is worse. Example that I don't want...

I am trying to build AGL(with poky icefish) as per instructions in https://wiki.automotivelinux.org/agl-distro/source-code inside a container based off...

Question: Sort the functions in increasing order of big-O complexity f1(n) = (n^0.999999) log n f2(n) = 10000000n f3(n) = 1.0000001^n f4(n) = n^2 My answer to this question is that is: 3, 2,...

I have 64 bit O/S and 64 bit Office installed. I have installed the MS Data Access components (tried various versions 64 bit/32 bit). I cannot get SSMS to import Excel files. I get error...

I find it difficult to calculate the time complexity of this program as it involves a lot of built-in methods. Could anyone please help? Basically the question is to find topper of each subject...

sh jmeter.sh -n -t filePath.jmx -l outFilePath.jtl -e -o folderPath Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer...

Let X be a set of distinct 64-bit unsigned integers std::uint64_t, each one being interpreted as a bitset representing a subset of {1,2,...,64}. I want a function to do the following: given a...

I found an interesting problem recently, which looks like this: There is a dull sorting algorithm which takes the 1st number from an array, it finds an element which is lower by 1 than the 1st...