BigO Exercise 1
BigO Exercise 1
aneagoie
aneagoie
This repl has no description
More repls
987comments
to comment
PrakharRastogi2

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

meettheravi
meettheravi1 day ago

O(n)

AaronKammerman
AaronKammerman2 days ago

O(n)

LuisRamirez12
LuisRamirez122 days ago

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

smithathouti
smithathouti2 days ago

2O(n)

Arka-max
Arka-max2 days ago

O(n)

vipul666
vipul6662 days ago

O(n)

vkalihall
vkalihall3 days ago

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

MohammadYazdan2
MohammadYazdan23 days ago

O(n)

engleangs
engleangs3 days ago

O(n)

KeshavGopal1
KeshavGopal14 days ago

O(N)

baihong0828
baihong08284 days ago

O(n)

NDivya1
NDivya14 days ago

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

SidduPatil
SidduPatil4 days ago

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

1Hanif1
1Hanif14 days ago

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

AlexandruManda
AlexandruManda5 days ago

O(n)

kingmazzaurus2k
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

ahmedkm1
ahmedkm15 days ago

O(n)

SBones
SBones6 days ago

O(n)

ushnuel
ushnuel6 days ago

O(n)

jaiswalavinash
jaiswalavinash6 days ago

O(n)

joshhcampbell7
joshhcampbell76 days ago

o(n)

SaviK
SaviK6 days ago

O(n)

shaniranshul
shaniranshul7 days ago

O(n)

FlooderCW1
FlooderCW17 days ago

O(n)

nojoven
nojoven1 week ago

O(n) ?

rsaurabh2004
rsaurabh20041 week ago

O(n)

elianacentamore
elianacentamore1 week ago

O(n)

georgius1024
georgius10241 week ago

O(n)

BryanChavarriaM
BryanChavarriaM1 week ago

O(n)

Jasper10636
Jasper106361 week ago

O(N).

erdavid
erdavid1 week ago

O(n)

DaylanBueno
DaylanBueno1 week ago

O(N), because of input array.

behnazsheikhi
behnazsheikhi1 week ago

O(N)

PappuDutta
PappuDutta1 week ago

it measures the time that taken by a function to run

wiseNinja
wiseNinja1 week ago

O(n)

Fperdreau
Fperdreau1 week ago

O(n)

malhotra-ashu
malhotra-ashu1 week ago

O(n)

cao2800
cao28001 week ago

o(n)

LiorRey
LiorRey1 week ago

O(n)

TarunAttri
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.

AnhKietKiet1
AnhKietKiet11 week ago

O(n)

WilsonYe2
WilsonYe22 weeks ago

O(n)

UtkarshaPatil
UtkarshaPatil2 weeks ago

O(n)

AbhishekJain43
AbhishekJain432 weeks ago

O(n)

SunnyHuang3
SunnyHuang32 weeks ago

O(n)

AbhishekVats1
AbhishekVats12 weeks ago

O(n)

lucasaraya1
lucasaraya12 weeks ago

O(N)

NaumanKhan
NaumanKhan2 weeks ago

O(n)

PallaviPillaris
PallaviPillaris2 weeks ago

O(N)

amdelaba
amdelaba2 weeks ago

O(n)

dioza22
dioza222 weeks ago

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

ShubhamKhandel7
ShubhamKhandel72 weeks ago

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

Davidmxdf
Davidmxdf2 weeks ago

O(n)

huynhkthai
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)

samerewidat
samerewidat2 weeks ago

O(n)

ThanakornKhiank
ThanakornKhiank2 weeks ago

O(n)

Vips120
Vips1202 weeks ago

o(n)

AshutoshJha007
AshutoshJha0072 weeks ago

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

saranroyal
saranroyal2 weeks ago

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

shobha12
shobha122 weeks ago

O(n)

sanket4005
sanket40052 weeks ago

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

BH231111
BH2311112 weeks ago

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

mohitaggarwal4
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().

ankushpokalwar
ankushpokalwar2 weeks ago

must be O(n) linearly increasing time complexity

GeoffreyFarrel
GeoffreyFarrel2 weeks ago

It's an O(n) / linear time

victorbarcenas
victorbarcenas2 weeks ago

This is an O(n)

Sreekar7
Sreekar72 weeks ago

O(n)

DennisSumiri1
DennisSumiri12 weeks ago

O(input)

amreshsingh
amreshsingh2 weeks ago

O(n)

seavphing
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

rajeshmadaye
rajeshmadaye3 weeks ago

O(n)

ankitbharti1994
ankitbharti19943 weeks ago

O(n)

YamelSalamanca
YamelSalamanca3 weeks ago

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

dineshparvathan
dineshparvathan3 weeks ago

O(n)

JuanPablo3401
JuanPablo34013 weeks ago

O(n)

PeterNuttachai
PeterNuttachai3 weeks ago

O(n)

ThibaultGuegan
ThibaultGuegan3 weeks ago

O(n)

AbhishekMishr60
AbhishekMishr603 weeks ago

O(1)

SaloniMi
SaloniMi3 weeks ago

Answer is O(n): Linear

mail2santhoshas
mail2santhoshas3 weeks ago

0(n)

SKNIRBHAY
SKNIRBHAY3 weeks ago

O(n)

BikramRoy3
BikramRoy33 weeks ago

O(n)

SplunkyDev
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.

BraveBeliever
BraveBeliever3 weeks ago

It is Big O(n) - Linear time

warlock2k
warlock2k3 weeks ago

O(n)

mohitsingh0610
mohitsingh06103 weeks ago

O(n)

kuldeepsharma99
kuldeepsharma993 weeks ago

O(n) -> Linear

SaurabhDubey5
SaurabhDubey53 weeks ago

O(n)

preetampatel
preetampatel3 weeks ago

O(n)

princ1211
princ12113 weeks ago

O(n)

mehdi-mirzapour
mehdi-mirzapour3 weeks ago

O(n)

VenkateshReddy3
VenkateshReddy33 weeks ago

O(n)

vijaymalawadkar
vijaymalawadkar3 weeks ago

Linear O(n).

senowijayanto
senowijayanto3 weeks ago

Linear. O(n)

PrathapReddy2
PrathapReddy23 weeks ago

O(n)

ritesh-sm
ritesh-sm3 weeks ago

Linear . O(n)

SruthiBommaredd
SruthiBommaredd3 weeks ago

Linear. O(n)

nilliie
nilliie3 weeks ago

O(n)

akshatbarwal
akshatbarwal3 weeks ago

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