Big(O) Notation for Time Complexity
In this section we will see examples of finding the Big(O) notation for certain constant, linear and quadratic functions.
Constant Complexity

In the constant complexity, the steps taken to complete the execution of a program remains the same irrespective of the input size. Look at the following example:
xxxxxxxxxx
function displayFirstCube(items) {
const result = Math.pow(items[0], 3);
console.log(result);
}
const inputs = [2, 3, 4, 5, 6, 7];
displayFirstCube(inputs);
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment