Big O explained with a deck of cards
Fireship · English · C2 (Proficient) · 59 seconds
Learn English with “Big O explained with a deck of cards” by Fireship: tap any word in the subtitles for its meaning in Azerbaijani or simple English. Level C2 (Proficient). “if you want to get a job as a programmer you need to know Big O”
Transcript with Azerbaijani translation
if you want to get a job as
Proqramçı kimi işə düzəlmək istəyirsinizsə,
a programmer you need to know Big O
Big O-nu bilməlisiniz:
imagine you have a shuffled deck of cards
təsəvvür edin ki, qarışdırılmış kart dəstəniz var,
if you want to pop one card
əgər bir kartı çıxarmaq istəyirsinizsə
off the stack that's extremely fast
yığından, bu, həddindən artıq sürətlidir
or o of one constant time
və ya bir sabit vaxt tələb edir,
but if you then want to count the cards
amma əgər siz kartları saymaq istəyirsinizsə,
you'll need to Loop over the entire
bütün dəstəni dövr etməli olacaqsınız
deck resulting in O of n or linear time
ki, bu da O(n) və ya xətti vaxtla nəticələnəcək.
but now let's imagine we need to
amma indi təsəvvür edək ki, bizə
sort the deck in perfect order
dəstəni mükəmməl sırada çeşidləmək lazımdır,
that's going to require a strategy
bu, bir strategiya tələb edəcək
or algorithm like bubble sort where
və ya qabarcıqlı çeşidləmə kimi alqoritm, harada ki
we Loop over the deck repeatedly
biz dəstəni təkrar-təkrar dövr edirik
and swap out adjacent cards
və bitişik kartları dəyişdiririk
until the entire thing is perfectly sorted
bütün şey mükəmməl çeşidlənənə qədər,
worst case we Loop over it
ən pis halda biz onun üzərindən keçirik
52 times giving us o of n^ s
52 dəfə, bizə n kvadrat verir
or quadratic time alternatively
və ya kvadratik vaxt, alternativ olaraq
if you're stupid you could throw the cards up in the air
əgər axmaqsaınız, kartları havaya tullaya bilərsiniz
and hope that they land perfectly sorted on the ground
və onların yerə mükəmməl çeşidlənmiş şəkildə düşməsini ümid edə bilərsiniz,
that's called BOGO sort
buna boqo sort deyilir
and gives you o of n factorial the
və sizə n faktoriyal verir,
worst possible time complexity
mümkün olan ən pis vaxt mürəkkəbliyi.
but now we want to find the
Words and phrases in this video
- quadratic (C2)
- kvadratik
- bogo (C2)
- boqo
- factorial (C2)
- faktoriyal
- logarithmic (C2)
- loqarifmik
- linear (C1)
- xətti
- adjacent (C1)
- bitişik
- complexity (C1)
- mürəkkəblik
- thus (C1)
- beləliklə
- shuffle (B2)
- qarışdırılmış
- deck (B2)
- dəstə
- pop (B2)
- çıxarmaq
- stack (B2)
- yığın
- constant (B2)
- sabit
- loop (B2)
- dövr etmək
- entire (B2)
- bütün
- algorithm (B2)
- alqoritm
- repeatedly (B2)
- defələrlə
- swap (B2)
- dəyişmək
- alternatively (B2)
- alternativ olaraq
- binary (B2)
- ikili
- split (B2)
- bölmək
- log (B2)
- loqarifm
- programmer (B1)
- proqramçı
- extremely (B1)
- həddindən artıq
- result (B1)
- nəticələnmək
- sort (B1)
- çeşidləmək
- require (B1)
- tələb etmək
- strategy (B1)
- strategiya
- bubble (B1)
- qabarcıq
- perfectly (B1)
- mükəmməl şəkildə
- otherwise (B1)
- əks halda
- process (B1)
- proses
- off (A2)
- kənarda
- count (A2)
- saymaq
- perfect (A2)
- mükəmməl
More videos to learn English with
- Bowling Ball vs LEGO® Wall · Mark Rober · A2
- World's most expensive keyboard · Mrwhosetheboss · A2
- Uh oh… AI-search engine for developers has emerged · Fireship · C2
- Lewis Hamilton Explains F1 Tire Strategy · Marques Brownlee · B2
- Meet SAM… Meta’s latest AI model · Fireship · C2
- When Should You Change Thermal Paste? · Linus Tech Tips · B2
- My $60,000,000 Experiment · Mark Rober · B2
- Should you be worried about the Asos hack? · BBC News · B2
- Stop Your Car From Getting Stolen! · Mark Rober · C1
- 60 Day Body Transformation · Mrwhosetheboss · A2
- my code works… why? · Fireship · B2
- 30 Day Body Transformation · Mrwhosetheboss · B1