Inverting Binary Trees - You Suck at Coding [1]

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024
  • Inverting binary trees is not as scary as it sounds.
    #benawad #coding #faang ​

    ----
    Follow me online: voidpet.com/be...
    #benawad

Комментарии • 842

  • @paul4ashraf
    @paul4ashraf 3 года назад +3233

    Not gonna lie I was actually impressed when you inverted the whole google doc

  • @clem
    @clem 3 года назад +2751

    I was going to give you a *Hire* decision, but the bird imitation at the end convinced me that this was worthy of a *Strong Hire*

  • @amanmathur_
    @amanmathur_ 3 года назад +1818

    Some poor kid is gonna watch this and recite it in an interview.

    • @pguti778
      @pguti778 3 года назад +16

      I'll do!!!!

    • @karanparmar4318
      @karanparmar4318 3 года назад +30

      I was planning to -

    • @PflanzenChirurg
      @PflanzenChirurg 3 года назад +7

      the show must go on ^^

    • @facundofrosoni6687
      @facundofrosoni6687 3 года назад +99

      I had to come to the comments because until 2:34 I didn't even suspect. But when he came up with "the programming language I like to start with is CSS", I said "fk I'm really lost or this guy's trolling me"

    • @phoneix24886
      @phoneix24886 3 года назад +5

      Shouldn't I? I thought the bird imitation could get me the job

  • @erwinschrodinger2320
    @erwinschrodinger2320 3 года назад +2142

    Alt F4 to open dev mode, a yes a professional.

    • @oliverchen4079
      @oliverchen4079 3 года назад +37

      I almost fell for it

    • @oliverchen4079
      @oliverchen4079 3 года назад +8

      Ctrl. Shift I or F12 or Ctrl. Shift J bruh

    • @31redorange08
      @31redorange08 3 года назад +52

      It actually closed the browser window for me.

    • @josephcagle
      @josephcagle 3 года назад +18

      Joke's on you. That didn't get me because I'm on a Mac.

    • @vincentadeniji6403
      @vincentadeniji6403 3 года назад +9

      @@31redorange08 yeah, that's what it's suppose to do rofl.

  • @kenjopac4247
    @kenjopac4247 3 года назад +859

    I died at "The language I like to start with is CSS"

    • @JaycenGiga
      @JaycenGiga 3 года назад +22

      Well, CSS *is* Turing complete, soo …

    • @PflanzenChirurg
      @PflanzenChirurg 3 года назад +2

      @@JaycenGiga its dependant too..

    • @monad_tcp
      @monad_tcp 3 года назад +7

      well, CSS is a language

    • @lugiadark21
      @lugiadark21 3 года назад

      Hahahahahhaa same 😂😂😂

    • @zekiz774
      @zekiz774 3 года назад +1

      @@monad_tcp HTML too. It's in the name Hyper Text Markup Language

  • @dbtechprojects2392
    @dbtechprojects2392 3 года назад +1338

    "This is bound to make you stand out ..... !important" I'm dying

    • @artinmajidi1654
      @artinmajidi1654 3 года назад +56

      In case anyone doesn´t understand, the important value means how it´s code is prioritized (in some cases properties collide). ! important means not important, so nothing will happen.
      (Apparently people don't get a joke)

    • @AsifIqbalR
      @AsifIqbalR 3 года назад +20

      @@artinmajidi1654 are you on crack?

    • @k00p28
      @k00p28 3 года назад +7

      @@artinmajidi1654 I'm pretty sure you are confused and confusing other dude

    • @rewrittenbytes1616
      @rewrittenbytes1616 3 года назад +29

      artin majidi tf? at least know what you’re talking about before you try to educate someone on something lmao
      !important is a css property which gives the attribute it’s used upon the highest precedence
      so basically the joke is if you use !important you’ll always have the highest priority
      given the context of the joke (he was literally using css) we can safely assume he was talking about the !important attribute in css, instead of using ! as “not”

    • @سعدالسيد-ل1ك
      @سعدالسيد-ل1ك 3 года назад +5

      @@artinmajidi1654 !important means a lot , !importat means important, u should study css to understand it, simply it makes the code stronger so the system will do it (because it is important), i advise u not to depend on it all the time or your project will fail.

  • @StevenCastellucci
    @StevenCastellucci 3 года назад +145

    I don't know what's more impressive -- your coding skills, or your ability to keep a straight face while giving "advice" :D

  • @simonthor7593
    @simonthor7593 3 года назад +663

    In Python, you can actually do
    node.left, node.right = node.right, node.left
    and skip the temporary variable

    • @samuelgunter
      @samuelgunter 3 года назад +78

      same with JavaScript, except you have to say [var2, var1] = [var1, var2]
      (replace var1 and var2 with 2 variables)

    • @brianevans4
      @brianevans4 3 года назад +10

      @@samuelgunter thats the cleanest array swap

    • @iDraKzy
      @iDraKzy 3 года назад +89

      @@samuelgunter And if the data is a number and you wanna be a fancy ass you can use the mathematical method:
      var1 = var1 + var2
      var2 = var1 - var2
      var1 = var1 - var2
      And just like that it's inverted :D

    • @samuelgunter
      @samuelgunter 3 года назад +28

      @@iDraKzy well yeah if you want to use extra lines and make it unclear :p

    • @iDraKzy
      @iDraKzy 3 года назад +8

      @@samuelgunter Or if you use another language than python or javascript ;p

  • @gaxxey4300
    @gaxxey4300 3 года назад +580

    4:38 please show the youtube stats on how many people "clicked off" the video at this point

  • @tejas3269
    @tejas3269 3 года назад +443

    Every time I hear :
    Do you want to be software engineer at Google
    I mute sound so that my friends can't laugh at me

    • @Bebs_
      @Bebs_ 3 года назад +43

      gO To aLgO expert dot CoMm

    • @safwanljd
      @safwanljd 3 года назад +14

      @@Bebs_ dot io*

    • @DragonRazor9283
      @DragonRazor9283 3 года назад +14

      gEt StUcK?

    • @captaincaption
      @captaincaption 3 года назад

      Lmfao

    • @aty4282
      @aty4282 3 года назад

      @@DragonRazor9283 sTeP bRo! *Is your way to go*

  • @ahuman32478
    @ahuman32478 2 года назад +8

    I came back to this video to thank you. A week ago, I applied to an entry-level python job and I managed to land an interview with the company. They asked me the classic questions like "What are your weaknesses", etc, and I was bombing so hard because I wasn't confident. But then, the magical moment came. They asked me to plan out a program to invert a binary tree on a whiteboard. Thankfully, I watched this video and was able to complete the task flawlessly. The recruiter was so impressed that he recommended that I work in a senior position instead of an entry-level one. Long story short, I ended up becoming the youngest CEO of a Fortune 500 company. Thank you, Ben Awad!

    • @aerohk
      @aerohk Год назад +5

      Fortune 500? That's a nice word for non-FAANG companies. Not impressed, try harder.

  • @himbeerme
    @himbeerme 3 года назад +140

    "They're like begging to be inverted or something." lmao

    • @Unreadable69
      @Unreadable69 3 года назад +2

      I actually laughed so hard when I heard that haha

    • @himbeerme
      @himbeerme 3 года назад

      @@Unreadable69 I also laughed out loud

  • @mo99
    @mo99 3 года назад +261

    "Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off." - Max Howell, creator of Homebrew

  • @satvikreddy8662
    @satvikreddy8662 3 года назад +75

    **at a faang interview**
    Interviewer: I would like you to perform the chacha slide on a binary octopus.
    Ben: You know I hold the world record fastest binary octopus chacha slide right?

  • @thatguyoverthere1648
    @thatguyoverthere1648 3 года назад +206

    8:25 Bruh. “I’m getting a compile error” in google docs, and in python, an interpreted language😂😂

    • @_trbr
      @_trbr 3 года назад +29

      Are you implying that Ben made a mistake here? Don't be ridiculous, he's a haskell chad - he wouldn't ever make a mistake

    • @thatguyoverthere1648
      @thatguyoverthere1648 3 года назад +11

      Oh, of course, I forgot about the new pep, which allows you to compile in google docs, ben couldn’t be wrong

  • @KarimShalapy
    @KarimShalapy 3 года назад +114

    Did y'all hear Ben imitate the birds' sound? He's secretly a bird that hates how trees look and his sole purpose in life is to invert 'em all!

  • @memespdf
    @memespdf 3 года назад +61

    8:45
    If you want to impress your interviewer, you can use the more pythonic way:
    node.left, node.right = node.right, node.left
    Note that this may also cause C++ developers to hang up on the spot so use with caution.

    • @hipstergod
      @hipstergod 3 года назад +6

      yeah from interview experience(over 40 tech interviews) they much rather you keep to normal conventions and not take advantage of Pythonic shortcuts, youre showing you know the language but youre mossong out on proving the thing theyre looking for whoch is programmatic understanding of data structures/algos
      if you do this stuff always make sure to state to the interviewer whats happening behind the scenes

    • @doc8527
      @doc8527 3 года назад +2

      @@hipstergod Exactly. It's a video for fun but I saw a lot of people are talking about those language shortcuts.
      I hate today's algo interview but a lot of people are indeed misunderstanding the "original purpose" of those questions.
      You can use those shortcut after explanation or show them the not shortcut version. They want to know your understanding of basic data structures/algos.
      Believe or not, a lot of people can do some fancy `filter()` `reduce()` functions to solve the problem with 1 line but don't know how to use a simple for loop to achieve the same thing. When you need to do some specific optimizations with your own for loop, this is the key why those questions are designed. Many terrible/slow apps have some filter(map()) like combination code to deal with some simple problem behind the scene, end up has O(n^2) - O(n^3) without concern.
      Unfortunately, 99% of algo questions are over complicated due to the markets, hot trends, salary, population, even H1B, etc. I believe the result of the bar rising is a complex problem behind the industry.

    • @hipstergod
      @hipstergod 3 года назад +1

      @@doc8527 yyeeess, I use Python for my interviews. its my first language and perfect for interviews but using Pythonic shortcuts are so much cancerrr. I hate going to leet code or hacker rank and seeing people throw 1 line solved and theyre so complex in that one line that no one else unless they know the shortcuts will understand, completely destroying the whole point of teamwork

    • @dscham1507
      @dscham1507 3 года назад +1

      I'm intrigued, how does this work? Oh wait, does it do 2 assignments at the same time, seperated by a comma? Holy 😨It's cool though.

    • @OMGclueless
      @OMGclueless 3 года назад

      @@dscham1507 Yup. The comma on the right builds a 2-tuple out of the right and left values. The comma on the left pattern matches against sequences of length two and assigns the values it finds to the left and right attributes. It works because the entire expression to the right of the equal sign is evaluated before any of the assignments on the left occur.

  • @akshitkumar9402
    @akshitkumar9402 3 года назад +35

    6:55 should be 10 spaces
    Failed the interview like a chad

  • @rishabhscodes
    @rishabhscodes 3 года назад +67

    F (for the microsoft interns who bring users to VSCode by making extensions)

    • @Enroxxx
      @Enroxxx 3 года назад +5

      btw, they get paid, pretty well.

  • @SuboptimalEng
    @SuboptimalEng 3 года назад +219

    *Ben Awad Exists*
    Angular: 👁👄👁

    • @sainathsingineedi2922
      @sainathsingineedi2922 3 года назад +4

      Hi suboptimal

    • @SuboptimalEng
      @SuboptimalEng 3 года назад +1

      @@sainathsingineedi2922 so we meet again 😂

    • @AnimusAgent
      @AnimusAgent 3 года назад

      angularJS*, cuz angular is a different framework ;)

    • @airor4
      @airor4 3 года назад

      @@AnimusAgent That always confuses me. Which one is he talking about? He should surely know angular 2.0+ is angular and not angularjs right?

  • @amanrubey
    @amanrubey 3 года назад +32

    this cracked me up " whenever u look at binary tree it already looks inverted"🤣🤣🤣

  • @ZapOKill
    @ZapOKill 3 года назад

    1. The DOM is not binary
    2. rotation is probably wrong scaleX(-1) is more accurate
    3. * is not correct
    NO HIRE!
    ...but a like and subscribe

  • @saideepesh6036
    @saideepesh6036 3 года назад +78

    9:54 when you're using Angular in front of Ben Awad

  • @nskybytskyi
    @nskybytskyi 3 года назад +26

    def InvertTree(node):
    if node:
    node.left, node.right = InvertTree(node.right), InvertTree(node.left)
    return node
    If you use python then why not unleash its true power?
    // with std::tie and std::make_pair, the same thing is possible in C++

  • @aaronmarsh8
    @aaronmarsh8 3 года назад +213

    Glad to see the Angular jokes are back 😃😂

  • @jimbos22
    @jimbos22 3 года назад +9

    "nice tree class, i always wanna make sure that i'm inverting the whole forest " this got me

  • @juledz
    @juledz 3 года назад +18

    That's how they made TENET just a bunch of transform classes

  • @Nnm26
    @Nnm26 3 года назад +53

    🎵"You suck at coding yeah you totally suck" 🎵

  • @Noah-fx4cm
    @Noah-fx4cm 3 года назад +7

    "they've never touched an underscore in their life" lmaoo, this speaks to me

  • @BigBahss
    @BigBahss 3 года назад +5

    This series is amazing, I love your subtle humor.

  • @nicholast
    @nicholast 3 года назад +3

    I have an interview next week and will definitely be using this strategy! Thanks Ben!

  • @ericlunadev
    @ericlunadev 3 года назад +18

    8:55 You can do the variable swap in python without that tmp var. You just need to do: node.left, node.right = node.right, node.left

    • @shairuno
      @shairuno 2 года назад +1

      You must be joking right ? Of course, he knows.

    • @gettinjcob4206
      @gettinjcob4206 2 года назад

      but thats inferior to transform rotateY

  • @ভালোবাসারবাড়ি-কণ্ঠেওকলমেকবিতা

    Google Headquarters: " Don't give Ben a job , RUclips will miss so many great videos "
    ❤️❤️🔥

    • @blink11101
      @blink11101 3 года назад +5

      They already have, he's on their payroll thanks youtube. Ben is meta af lol

  • @JadeDevinCabatlao
    @JadeDevinCabatlao 3 года назад +41

    "Binopus". For a moment, I heard something else.

  • @fendoroid3788
    @fendoroid3788 3 года назад +127

    Don't you hate when they reject you just because you can't invert a binary tree?

    • @Enroxxx
      @Enroxxx 3 года назад +24

      inverting a binary tree it's super easy, barely an inconvenience.

    • @JOJO_THE_PROGRAMMER
      @JOJO_THE_PROGRAMMER 3 года назад +2

      Data structure is fun

    • @seanlawton7681
      @seanlawton7681 3 года назад +22

      It's a pointless demonstration of memory, like taking a test for school.

    • @Enroxxx
      @Enroxxx 3 года назад +9

      @@seanlawton7681 do you think it is an algorithm that you need to memorize? LOL!!!

    • @seanlawton7681
      @seanlawton7681 3 года назад +22

      @@Enroxxx We get it bro, you're very smart

  • @luke7503
    @luke7503 3 года назад +7

    It’s so well made that even with no coding knowledge I can tell this is cursed as fuck

  • @officiallyjk420
    @officiallyjk420 3 года назад +1

    Your explanation of swapping left and right was actually very welcome. I made the mistake of not using a temporary variable when I wrote my first swap function and I could not figure out why it wasn't working!!!

  • @ivovanderknaap4616
    @ivovanderknaap4616 3 года назад +5

    I'm doubting my entire codebase which was inspired by ben's full-stack tutorials now.

  • @twitchhighlights9802
    @twitchhighlights9802 3 года назад +8

    I just started to code. Thanks for showing me how to get a job at Google. I think I'm going to pass it.

  • @billatwork9357
    @billatwork9357 3 года назад +1

    As an Angular developer, I love you! Most amusing channel on RUclips all-together!

  • @Fidelity_Investments
    @Fidelity_Investments 3 года назад +3

    "The programming language I'd like to start with is CSS" ~Ben Awad, 2021.

  • @mojimojimojimojimoji
    @mojimojimojimojimoji 3 года назад +1

    For a second there I thought you're gonna use comic sans and my heart skipped a beat.

  • @emilfilipov169
    @emilfilipov169 3 года назад +7

    Most of them are C++ chads and have never touched an underscore in their lives xDD I'm dying!

  • @usmanmir5663
    @usmanmir5663 3 года назад +22

    Last time I was this early I wrote 50 lines of code without a single error
    I was never this early

  • @evelyntelevision
    @evelyntelevision 3 года назад

    Important facts, made even better with the cedar waxwing cameo at the end. Those birds get drunk on berries, that's probably why they want to get inverted.

  • @dtpietrzak
    @dtpietrzak 3 года назад +1

    Wow. Best youtube programming tut. A+. 5/5 stars. 10/10 thumbs up. 0/0 angulars. 100% rotten tomatoes.

  • @kalyansreekarjhade2944
    @kalyansreekarjhade2944 3 года назад

    This is the first video I watched in your channel. I pinched myself to check if I was dreaming.

  • @kaikalii
    @kaikalii 3 года назад +3

    Counting out the spaces really got me

  • @ismail.dalhatu
    @ismail.dalhatu 3 года назад +1

    I’ve never being that happy for subscribing till today. 😂😂😂 I love the personality.

  • @nicktech2152
    @nicktech2152 3 года назад

    Alt+F4 to open dev tools is now my favourite shortcut

  • @cristianodj
    @cristianodj 3 года назад +1

    I never thought that Comfortaa is actually a good font.

  • @rohan1765
    @rohan1765 3 года назад +3

    At 4:38 the amount of people left are actually the one's who'll be the future of programming , we are just temporary.

  • @m4tt72
    @m4tt72 3 года назад +1

    the 5 spaces made me spill my drink

  • @dr4kk0nnysinc59
    @dr4kk0nnysinc59 3 года назад

    The fact that this made a whole lot of fucking sense is making me question absolutely everything

  • @himanshupratap29
    @himanshupratap29 2 года назад

    Loved your coding style, loved your sense of humour.

  • @neeraj1bh
    @neeraj1bh 3 года назад +1

    This is the motivation I needed before applying and it's !important to watch twice before an interview.

    • @bluebee2431
      @bluebee2431 3 года назад

      Watch it recursively with no base case, for sure

  • @aaronvillegas7900
    @aaronvillegas7900 2 года назад

    More of these videos from this Playlist please! Love them!

  • @chunchunmaru3644
    @chunchunmaru3644 3 года назад +1

    9:00
    You can do node.left,node.right = node.right,node.left.
    I know that this a joke, but just in case someone is genuinely interested

  • @WeeklyHow
    @WeeklyHow 3 года назад +25

    POV: you're taking ben seriously and you agree to whatever he says

    • @bellarose6310
      @bellarose6310 3 года назад +2

      So (serious question), I am supposed to ignore this video right? Not use this to learn? Because I really cant tell

    • @nickwilson3499
      @nickwilson3499 3 года назад +2

      @@bellarose6310 no it’s a serious video just filled with a few jokes. CSS is probably the easiest way to invert a binary tree

    • @josephcagle
      @josephcagle 3 года назад +1

      @@bellarose6310 Yes, speaking seriously, this is a completely unserious video. (The python stuff at the end probably works, but if you're actually trying to learn, you're better off elsewhere.)

    • @JOJO_THE_PROGRAMMER
      @JOJO_THE_PROGRAMMER 3 года назад +1

      @@bellarose6310 if you are here to learn data structure and algorithms then you're in wrong place. His react tutorials are good tho

  • @abanerjee3704
    @abanerjee3704 9 месяцев назад +1

    I just came here to rewatch this masterpiece of comedy!

  • @איתןטורפז
    @איתןטורפז 3 года назад +1

    I don't know if you all knew that but in python you can literally write-
    a, b = b, a
    this will switch those two and it's really nice and not very known

  • @spacebuffer
    @spacebuffer 3 года назад +1

    your voice is so serious I almost fell for the alt f4 trick

  • @nicolasrulli
    @nicolasrulli 2 года назад

    “Oh wait I’m getting compile errors”
    I’ve watched this video so many times in less than 24 hours I’m losing it

  • @ahmedal-qarqaz3510
    @ahmedal-qarqaz3510 3 года назад

    This video has better CS comedy than the entirety of silicon valley

  • @akam9919
    @akam9919 Год назад

    For a second, you actually had me wondering if I had mandela effected into a universe where alt-F4 opens dev tools and doesn't close a window.
    I double checked.
    So far, still the same universe.

  • @gavincraddock5772
    @gavincraddock5772 3 года назад

    Love it, recommended to my A Level CS students. Left arms frequently get chopped off. I'm concerned that some won't get the humour, but hey, that's life in the big city.

  • @prithivirathinam
    @prithivirathinam 3 года назад +1

    Ben, you have always been on my feed when I start watching more tech videos but I am legit subbing you after this. This is a masterpiece .. 😂😂 .. enjoyed the diss at microsoft and certain someone working there.. 🤣

  • @dawnstar24
    @dawnstar24 11 месяцев назад

    When I first watched it, I thought this was very hard but after a year. I can finally invert a binary tree.

  • @nathanielwoodbury2692
    @nathanielwoodbury2692 3 года назад +2

    Ben is literally my favorite tech channel on RUclips

  • @michapodlaszuk9025
    @michapodlaszuk9025 3 года назад

    You can also go for node.left, node.right = node.right, node.left and that works well too

  • @wewep6649
    @wewep6649 3 года назад +9

    4:03 nice one!
    Now I can finally apply for a job at Google.

  • @igz5553
    @igz5553 3 года назад

    Writing code in a Google Doc is the ultimate way to display your superiority.

  • @Raj00001Mr
    @Raj00001Mr 3 года назад

    You are getting really good at it, Man. Thanks for the video.

  • @raqha4575
    @raqha4575 3 года назад

    Its ironic that we had Binary Search Trees today in lectures and i get this recommended...

  • @ishtiaquekhan1148
    @ishtiaquekhan1148 3 года назад

    The "ad" actually popped up at the end of the video!

  • @rajatsemwal1865
    @rajatsemwal1865 3 года назад

    Ben: *rotates the whole Google doc*
    FAANG: Fuck! Hire him right now!

  • @notleeland
    @notleeland 3 года назад +1

    I haven’t watched this channel in a couple years. Ben, you’re freakin hilarious now ahaha

  • @chenmucls
    @chenmucls 3 года назад

    An inverted bird: you're HIRED.

  • @EricHampton12
    @EricHampton12 3 года назад

    I was going to sub regardless, but the !important completely sold me. Nice work!

  • @neillunavat
    @neillunavat 3 года назад

    JavaScript to CSS - you are !important
    CSS - *blushes*
    JavaScript - *grins*

    • @neillunavat
      @neillunavat 3 года назад

      To avoid r/whooshing anybody, ill explain it here.
      Im javascript ! means "not". Therefore javascript was making a joke that css is not important. But in css, if you want to override all variables with a value, you have to use the exclamation mark (!). Therefore, css thinks javascript said that she is important.
      r/whoosh

  • @ImNotSoLegit
    @ImNotSoLegit 2 года назад

    "You're gonna want to tell them to hit alt-f4 to open up dev tools-" Savagery.

  • @rickr937
    @rickr937 3 года назад

    This should be in youtube rewind 2021 or get an Oscar or even a Turing award

  • @Fidelity_Investments
    @Fidelity_Investments 3 года назад

    When you hit that 5th space I passed out.

  • @ciberman
    @ciberman 3 года назад +8

    - "I'm getting compiler errors. Let's make this into a comment"
    * proceeds to change the background text color to green *

  • @TimeWobblers
    @TimeWobblers 3 года назад

    First I thought it was an actual guide on inverting a binary tree... Got hired using this approach, thanks!

  • @veryniceman4059
    @veryniceman4059 3 года назад +1

    this video taught me that i know nothing about coding, i need to re-learn everything that sucks ._.

  • @imanifesteasily
    @imanifesteasily 2 года назад

    "i always wanna make sure im inverting the whole forest" HELP

  • @rockpickable
    @rockpickable 3 года назад

    this is the first of your vids that i'm watching. took me a while to figure out, that you're just trolling xD

  • @dexterman6361
    @dexterman6361 3 года назад +8

    I applied to MS in 2017, they're still reviewing my application apparently. Same with a lot of other companies.

  • @ujjal147
    @ujjal147 3 года назад

    Birds to Ben: What are you looking at?
    Ben: Imma invert these bird's whole tree.
    This turned out bad.

  • @shreyanshmishra6613
    @shreyanshmishra6613 3 года назад +7

    The css one got me...
    I laughed so hard!

  • @staz-tech9961
    @staz-tech9961 3 года назад

    “I want to make sure I’m inverting the whole forest” 😂😂

  • @henrytheswimmer9453
    @henrytheswimmer9453 3 года назад +33

    Who actually learnt how to invert a binary tree?

    • @jairovera8065
      @jairovera8065 3 года назад +3

      Me! I do recursion at work but shit my pants when asked to invert a binary tree.

    • @JOJO_THE_PROGRAMMER
      @JOJO_THE_PROGRAMMER 3 года назад +1

      CSS is a good way to do this

  • @runnerkidal
    @runnerkidal 3 года назад

    This is giving me "you suck at producing vibes" minus the phalluses

  • @suryad998
    @suryad998 3 года назад

    “It’ll crash like my sister when she’s driving” Ben is ruthless 😂😂

  • @waiitwhaat
    @waiitwhaat 2 года назад

    This video made me realise that the better you are at programming the quicker you realise the theme of this video.

  • @KevinNaughtonJr
    @KevinNaughtonJr 3 года назад +1

    i've been doing this all wrong

  • @adityabhatia7503
    @adityabhatia7503 3 года назад

    This video caused actual, physical pain because I was laughing the entire time.

  • @pratheeks
    @pratheeks 3 года назад +3

    8:05 best explanation of screwing up swapping. Btw can we use (Node.left, Node.right) = (Node.right, Node.left)?
    Edit: It works, you don't even need to use the parentheses.

  • @TwoTeaTee
    @TwoTeaTee 3 года назад +5

    I'll be mad if he gets a call after this masterpiece!