Skip to content
Repl icon
BigO Exercise 2
aneagoie
aneagoie
This repl has no description
More repls
ASCII ART GENERATOR
ASCII ART GENERATOR
GLiQue
GLiQue
Convert Images and Texts Into ASCII Art. Packages Used: PIL for image to ASCII Art pyfiglet for text to ASCII Art Update: Added Text To ASCII Art Generator Custom Font option in Text to ASCII Generator Added Unicode char style in image to ASCII Generator Helpers: @codeitfast @DariaScott Important So many users are getting this error local variable 'image' referenced before assignment Why is this happening? There are 2 reasons behind this: The Image URL is not accessible The Image type is not supported (svg, gifs, etc.) Note: Images are not saved anywhere
#apps
+4
ColdChat Client (chat app)
ColdChat Client (chat app)chat app in node.js using socket.io I've made many chat apps previously but I got inspiration for a simplistic-looking, console-based one from the previously trending "ctrl chat" (by @blockowo). I felt bad about its many serious security flaws and literally zero validation. Seeing it get destroyed by exploiters made me want to start working on a secure chat app with validation, backend word filters, powerful anti-spam, and a proper account system. So far I've only made the basic security infrastructure and a simple layout, plus a powerful anti spam. This of course isn't finished and there are PLENTY of updates planned and coming soon.
Evolution
EvolutionSimulate evolution by selecting for certain criteria! This simulation tries to replicate evolution by simulating movements of little creatures named "cells". A small pet project by IcemasterEric, this turned out to work extremely well!
1055comments
moonty4790
moonty47905 months ago

O(n) , while ignoring the constants

ShubhamBhardw15
ShubhamBhardw155 months ago

O(4+7n) -> O(n)

Tim-fx
Tim-fx5 months ago

O(4+7n) -> O(n)

SachinKumawat
SachinKumawat5 months ago

O(4+7n) = O(n)

kavitamahar
kavitamahar5 months ago

O(n)

Madhura194
Madhura1945 months ago

O(4+7n) ==> O(n)

PauloAntonio1
PauloAntonio15 months ago

Big O(4 + 7n) Big 0(n)

Amrelsherif7
Amrelsherif75 months ago

O(n), when we have two for loops both of them is O(n) so sum of them is O(2n) but we neglect the constants when it comes to BigO so as a result it will be O(n)

huuhou48
huuhou485 months ago

O(n)

norbeqr89
norbeqr895 months ago

BigO(4+7n) --> O(n)

kartiwatt
kartiwatt5 months ago

It will be O(4 + 5n) as per the previous video solution but generally, I believe it should be O(n)

sheldonO
sheldonO5 months ago

o(n)

arao92
arao925 months ago

O(N) - 2 loops - 2 different operations being executed linearly

tarantula77
tarantula775 months ago

simplified to O(n)

AnastassiyaM
AnastassiyaM5 months ago

BigO (4 + 7n)

RomanYefimets
RomanYefimets5 months ago

if we really want to get technical: O(6 + 9n)

let a = 5; let b = 10; let c = 50; // O(3) let i = 0 // O(1) i < input // O(n) i++. // O(n)

let x = i + 1; let y = i + 2; let z = i + 3; // O(3n)

let i = 0 // O(1) i < input // O(n) i++. // O(n)

let p = j * 2; let q = j * 2; // O(2n)

let whoAmI = "I don't know"; // O(1)

ShreekantaKaval
ShreekantaKaval6 months ago

O(2^n)

narasimhakamath
narasimhakamath6 months ago

Simplified to O(n).

pushpalika
pushpalika6 months ago

O(4+5n)

prabhakarkaraja
prabhakarkaraja6 months ago

O(4+7n)

Nacht-33
Nacht-336 months ago

O(7n+4)

ObulPathi
ObulPathi6 months ago

O(n)

sultan-O7t9
sultan-O7t96 months ago

O(4+7n) => O(n)

Sheyijojo
Sheyijojo6 months ago

O(4+5n)

i-am-notorious
i-am-notorious6 months ago

O(4+7n)

rabira-hierpa
rabira-hierpa6 months ago

O(4 + 7n)

Pradhan1999
Pradhan19996 months ago

O(n)

JosueValverde
JosueValverde6 months ago

O(4 + 7n)

Krishna1705
Krishna17056 months ago

o(4+7n)

gastonkons
gastonkons6 months ago

O(4 + 7n)

TharangaSubasin
TharangaSubasin6 months ago

o(4+5n)

Aditya1114
Aditya11146 months ago

O(4+7n) ~ O(n)

HarshaMadhwani
HarshaMadhwani6 months ago

o(n)

yingweiliu
yingweiliu6 months ago

o(n)

ShacharBartal
ShacharBartal6 months ago

O(n)

SameerJoshi4
SameerJoshi46 months ago

O(4+7n) = O(n)

0010E86
0010E866 months ago

Wondering why it is O(4+5n) instead of O(4+7n)

amruthas4
amruthas46 months ago

O(n)

AravindBhuvanen
AravindBhuvanen6 months ago

O(4 + 7n)

Mrunal-13
Mrunal-136 months ago

O(4+7n)==O(n)

ILORIAbdrasheed
ILORIAbdrasheed6 months ago

4 + 5n == O(n)

jomefavourite
jomefavourite6 months ago

O(4 + 7n) O(n)

PeterSedlacek
PeterSedlacek6 months ago

O(n)

anhthiencao
anhthiencao6 months ago

O(n)

VishalJha5
VishalJha56 months ago

O(N)

MonarchNigam
MonarchNigam6 months ago

O(n)

rajdeepti19
rajdeepti196 months ago

Big O: 4 - O(1) & 7 - O(n), i.e O(4 + n + n + n + n + n + n + n) = O(4 + 7n) implies to O(n).

VenkateswarUpad
VenkateswarUpad6 months ago

Big O(4+ n + n + n + n + n) => O(4+5n) => O(n)

FredSharapov
FredSharapov6 months ago

O(n)

RupeshPatil2
RupeshPatil26 months ago

(4 + 5n) >>> O(n)

umairnazeer
umairnazeer6 months ago

O(n)

OluwatosinSolar
OluwatosinSolar6 months ago

4(5 * n)

RodeAjinkya
RodeAjinkya6 months ago

O(n)

AmrAkram
AmrAkram6 months ago

O(n)

luisangel2895
luisangel28956 months ago

O(n)

UchennaMba
UchennaMba6 months ago

O(4) + 5n

MAHMUD9
MAHMUD96 months ago

(O4+O5)=O(n)

sibsankarmanna
sibsankarmanna6 months ago

(O4+7n)=O(n)

AbdulRahman103
AbdulRahman1036 months ago

what is the big 0? function multiply(input){ if(input<=0){ console.log("i should be greater than 0"); }else{ for(i=1; i<=10; i++){ let mult = i*input; console.log(${input}*${i}=${mult}); } } }

multiply(10);

AbdulRahman103
AbdulRahman1036 months ago

O(4 + 5n) 4 is the constant time because, irrespective of inputs its always operations remain constant outside the for loop, whereas for loop and the statements under that will have an equal number of operations based on a number of inputs so it is 5n. hence it is O(4 + 5n)

copbrick
copbrick6 months ago

O(n)

ROHITPATIL11
ROHITPATIL116 months ago

O(4 + 7n)

pain459
pain4596 months ago

O(4 + 5n) ==> O(n)

Kanishk-Mewal
Kanishk-Mewal6 months ago

O(n) doesnt matter if its 5n or 7n :P

bartondhb
bartondhb6 months ago

O(5n+4) => Simplified to O(n)

5n, not 7 because even though the two operations in the second for loop are multiplication, we only count the assignment, not the multiplication itself. (I think :) )

udkronjk
udkronjk6 months ago

4+7n

mahasamudram-ch
mahasamudram-ch6 months ago

O(4+7n) => O(n)

JamieLiu228
JamieLiu2286 months ago

4+5n

patilarvind15
patilarvind156 months ago

4+ 7n

prabumari
prabumari6 months ago

O(4+7n) Simplify => O(n)

KayWei2000
KayWei20006 months ago

O(7n+4)

3dots3craters
3dots3craters6 months ago

O(1 + 1 + 1 + n + n + n + n + n + n + n + 1) = O(4 + 7n) = O(n)

A32Arghya-Chatt
A32Arghya-Chatt6 months ago

O(N) as it is the highest degree of N the function is depending on

byeolieonni-kae
byeolieonni-kae6 months ago

O(1+1+1+n+n+n+n+n+n+n+1) -> O(4+7n) -> O(n)

johnpole
johnpole6 months ago

O(4+5n)

jithinrajareepu
jithinrajareepu6 months ago

O(n)

TechsbeyondTech
TechsbeyondTech6 months ago

O(n)

SiddharthBose3
SiddharthBose36 months ago

O(n)

FJDLDuarte
FJDLDuarte6 months ago

O(n)+O(n) = 2*O(n)≈ O(n)

ChristinaHunter
ChristinaHunter6 months ago

4 + 7n -> O(4 + 7n) -> O(n)

IshwarNagwani
IshwarNagwani6 months ago

It is O(N) as we can drop constant from O(2N)

Jan-SherSher
Jan-SherSher6 months ago

O(n)

sulecodez
sulecodez6 months ago

O(4+7n) --> O(n)

iodinegs
iodinegs6 months ago

O(n)

ThomasReese
ThomasReese6 months ago

O(n)

MayankChoudhar2
MayankChoudhar27 months ago

O(n)

priyanshrm
priyanshrm7 months ago

O(4+7n)

KumarSaurabh7
KumarSaurabh77 months ago

O(n)

SeemaPatil
SeemaPatil7 months ago

O(4+7n)

quaosqrz
quaosqrz7 months ago

Still O(n), where n = input

dennisdcap
dennisdcap7 months ago

O(4+7n) || O(n)

tuyenphk
tuyenphk7 months ago

O(n)

HugoOrlandoOrla
HugoOrlandoOrla7 months ago

Big O (4 + 7n) -> O(n)

CesarAlcantara3
CesarAlcantara37 months ago

O(n )

bkAishwarya
bkAishwarya7 months ago

BIG O(7n+4)

Dhathri19
Dhathri197 months ago

O(n)

LeoM1
LeoM17 months ago

O(n)

RagabSingh
RagabSingh7 months ago

Big O (4 + 7n)= O(n)

keshavanravi
keshavanravi7 months ago

O(n)

svanmidd90919
svanmidd909197 months ago

This is still O(n) b/c the two loops execute sequentially.