Algorithms in O(n^2) vs O(n) [duplicate]

What you are asking about is a topic in computer science known as Algorithm Complexity Analysis. It is a very important topic to consider when writing algorithms, or solutions, in your programs because it relates to run-time, or how fast your computations will run. Big-Oh, or O(n) relates to the upper-bound run-time for an algorithm … Read more