BigO Exercise 1

This repl has no description

987comments

to comment

meettheravi1 day ago

O(n)

AaronKammerman2 days ago

O(n)

LuisRamirez122 days ago

In conclusion Time Complexity is O(n) because the loop will execute n times the inside instructions.

smithathouti2 days ago

2O(n)

Arka-max2 days ago

O(n)

vipul6662 days ago

O(n)

vkalihall3 days ago

O(n). Since all operations will execute the number of times the input length.

MohammadYazdan23 days ago

O(n)

engleangs3 days ago

O(n)

KeshavGopal14 days ago

O(N)

baihong08284 days ago

O(n)

NDivya14 days ago

O(n). number of operations is as much the length of input

SidduPatil4 days ago

I do not see anything but a blank screen, Is anyone facing the issue?

1Hanif14 days ago

O(1 + 1 + n (1 + 1 + 1) + 1) => O(3 + 3n) => O(n)

AlexandruManda5 days ago

O(n)

kingmazzaurus2k5 days ago

O(n) as the funChallenge function loops through the length of input and also the anotherFunction does not take input as its argument

ahmedkm15 days ago

O(n)

SBones6 days ago

O(n)

ushnuel6 days ago

O(n)

jaiswalavinash6 days ago

O(n)

joshhcampbell76 days ago

o(n)

SaviK6 days ago

O(n)

shaniranshul7 days ago

O(n)

FlooderCW17 days ago

O(n)

nojoven1 week ago

O(n) ?

rsaurabh20041 week ago

O(n)

elianacentamore1 week ago

O(n)

georgius10241 week ago

O(n)

BryanChavarriaM1 week ago

O(n)

Jasper106361 week ago

O(N).

erdavid1 week ago

O(n)

DaylanBueno1 week ago

O(N), because of input array.

behnazsheikhi1 week ago

O(N)

PappuDutta1 week ago

it measures the time that taken by a function to run

wiseNinja1 week ago

O(n)

Fperdreau1 week ago

O(n)

malhotra-ashu1 week ago

O(n)

cao28001 week ago

o(n)

LiorRey1 week ago

O(n)

TarunAttri1 week ago

O(n) as based on the length of input array, operations will increase or decrease. Also based on fact that strangerFunction() does not invoke any more loops.

AnhKietKiet11 week ago

O(n)

WilsonYe22 weeks ago

O(n)

UtkarshaPatil2 weeks ago

O(n)

AbhishekJain432 weeks ago

O(n)

SunnyHuang32 weeks ago

O(n)

AbhishekVats12 weeks ago

O(n)

lucasaraya12 weeks ago

O(N)

NaumanKhan2 weeks ago

O(n)

PallaviPillaris2 weeks ago

O(N)

amdelaba2 weeks ago

O(n)

dioza222 weeks ago

O(n) unless anotherFunction() has a loop in its definition

ShubhamKhandel72 weeks ago

O(N) only if the function inside the loop is not invoking any other loop or complex logic

Davidmxdf2 weeks ago

O(n)

huynhkthai2 weeks ago

O(n) because everything outside the loop is constant time and the loop runs n times given n and the input. anotherFunction does not take "input" so it would also be constant O(1). Overall, O(n)

samerewidat2 weeks ago

O(n)

ThanakornKhiank2 weeks ago

O(n)

Vips1202 weeks ago

o(n)

AshutoshJha0072 weeks ago

it would be O(n * O(anotherFunction)) If anotherFunction is liner it will be O(n)

saranroyal2 weeks ago

O(n) provided anotherFunction() is of O(1) otherwise it will be O(O(anotherFunction())) :)

shobha122 weeks ago

O(n)

sanket40052 weeks ago

it will depend on the number of operations within anotherFunction().

BH2311112 weeks ago

O(n) unless the anotherFunction has any loop with in

mohitaggarwal42 weeks ago

complexity depends on anotherFunction(). if complexity of anotherFunction() is less than O(input) then compleity of funChallenge will be O(input) else complexity will be of anotherFuntion().

ankushpokalwar2 weeks ago

must be O(n) linearly increasing time complexity

GeoffreyFarrel2 weeks ago

It's an O(n) / linear time

victorbarcenas2 weeks ago

This is an O(n)

Sreekar72 weeks ago

O(n)

DennisSumiri12 weeks ago

O(input)

amreshsingh2 weeks ago

O(n)

seavphing2 weeks ago

I think this is the 0(n) because it's depend on the input parameter, so when it gets bigger it will become the linear of n

rajeshmadaye3 weeks ago

O(n)

ankitbharti19943 weeks ago

O(n)

YamelSalamanca3 weeks ago

0(n) as the amount of operations depend on the input

dineshparvathan3 weeks ago

O(n)

JuanPablo34013 weeks ago

O(n)

PeterNuttachai3 weeks ago

O(n)

ThibaultGuegan3 weeks ago

O(n)

AbhishekMishr603 weeks ago

O(1)

SaloniMi3 weeks ago

Answer is O(n): Linear

mail2santhoshas3 weeks ago

0(n)

SKNIRBHAY3 weeks ago

O(n)

BikramRoy33 weeks ago

O(n)

SplunkyDev3 weeks ago

Big O(n), the time complexity will be increasing as input increases. And in Big O we consider the highest order and ignore the others.

BraveBeliever3 weeks ago

It is Big O(n) - Linear time

warlock2k3 weeks ago

O(n)

mohitsingh06103 weeks ago

O(n)

kuldeepsharma993 weeks ago

O(n) -> Linear

SaurabhDubey53 weeks ago

O(n)

preetampatel3 weeks ago

O(n)

princ12113 weeks ago

O(n)

mehdi-mirzapour3 weeks ago

O(n)

VenkateshReddy33 weeks ago

O(n)

vijaymalawadkar3 weeks ago

Linear O(n).

senowijayanto3 weeks ago

Linear. O(n)

PrathapReddy23 weeks ago

O(n)

ritesh-sm3 weeks ago

Linear . O(n)

SruthiBommaredd3 weeks ago

Linear. O(n)

nilliie3 weeks ago

O(n)

akshatbarwal3 weeks ago

O(n), we are just looping thru the length of the input.

I think its - O(n) + O(anotherFunction())Because we don't know what another function is doing.