These Problems Made Me A Great Dev

Sdílet
Vložit
  • čas přidán 5. 09. 2024
  • GO SIGN UP FOR ADVENT OF CODE RIGHT NOW adventofcode.com/
    I LOVE YOU MIR THANK YOU FOR MAKING THIS EDIT SO ABSURDLY FAST
    Link to stream this was from: • STREAM VOD: I WAS WRON...
    ALL MY VIDEOS ARE POSTED EARLY ON PATREON / t3dotgg
    Everything else (Twitch, Twitter, Discord & my blog): t3.gg/links
  • Věda a technologie

Komentáře • 87

  • @wiztek1197
    @wiztek1197 Před rokem +39

    Still cant over the guy that did last years AoC in PostgreSQL

    • @metalheader1
      @metalheader1 Před rokem +8

      wait, what now? lol

    • @jl789nz
      @jl789nz Před rokem +2

      Just seen someone doing it in excel as well.

  • @flyingsl0ths961
    @flyingsl0ths961 Před rokem +19

    this is gonna be my first time participating in advent of code, pretty excited 😃

  • @aaaaanh
    @aaaaanh Před rokem +83

    Advent should just crown Copilot their MVP already 😂

  • @DMSBrian24
    @DMSBrian24 Před rokem +2

    The timezone stuff sucks, for us in Europe this is early morning. So we pretty much can't compete if we have a job.

    • @xyangst
      @xyangst Před 9 měsíci

      6 am is good for me xd

  • @Bobbias
    @Bobbias Před rokem +15

    Always happy to see advent getting attention. They have some really great problems.

  • @samuelgunter
    @samuelgunter Před rokem +86

    For part B, wouldn't this work and be simpler to implement:
    declare a variable "count"
    start iteration through all values of the array
    if bracket is ")", count -= 1
    else count += 1
    if count == -1, return index (plus one, since 1-based index)
    using a stack just seems to complicate the process

    • @ponirvea
      @ponirvea Před rokem +8

      the stack is the textbook, most general solution to bracket matching algorithms, he probably came to that solution by googling/researching the problem

    • @mrsherman3103
      @mrsherman3103 Před rokem

      this is exactly what I thought. I would love to know the reason for his solution

    • @samuelgunter
      @samuelgunter Před rokem +5

      @@ponirvea I give that a 0.000000000000000000000000000000000000000000000000000000000000000000000374% chance that that's what happened, because he almost certainly knew about this algorithm already. he used that solution either because of the pressures of being live (this was an old challenge, so points or speed didnt matter for a leaderboard) or because generally overthinks/overengineers things (or a combination of the both)

    • @t3dotgg
      @t3dotgg  Před rokem +9

      Yeah this is faster
      Usually when there are "matches" in problems like this, the next part is more complex matching patterns. I've used this "chemical reduction" problem for interviews for years and it has caused slight brain rot adventofcode.com/2018/day/5

    • @Kay8B
      @Kay8B Před rokem

      This is what I thought of... I'm glad I had a decent approach, usually suck at these

  • @parkourbee2
    @parkourbee2 Před rokem +7

    This is gonna kill my sleep schedule being on east coast, but worth it

  • @abag777
    @abag777 Před rokem +4

    I'm doing advent of code for the first time this year. I didn't realize then there was supposed to be time pressure. I just did the past few days challenges this morning because I put them off. Oh well, I've managed to get some good coder reuse going for some of the problems.

  • @DennisPing
    @DennisPing Před rokem +11

    I dislike Leetcode, but I remembered the related Leetcode question for the parenthesis problem. I also remembered the related Leetcode question for this year's Day 1. Both were easy level, but useful for students to study.

  • @mariansam_was_taken
    @mariansam_was_taken Před rokem +3

    Theo: "if you're a sub"
    Me: "you sure i am"

  • @Frankolious
    @Frankolious Před rokem

    DUDE , the bass drop at 5:10!!!! YES MAN it even got me dancing haha

  • @philmarlin6204
    @philmarlin6204 Před rokem +6

    inb4 the Rustaceans go into hyperdrive for 30 days

  • @anasouardini
    @anasouardini Před rokem +1

    depending on how B is different from A... A's scalability score changes. which make me think that there is no point.
    you can try to make A as generic as possible but no matter what you cannot guarantee that it would make B easier to code.
    I think that AOC is not much different than LC.

  • @chawakornchaichanawirote1196

    Thanks for reminding me about AoC!

  • @TheMaDNiaC
    @TheMaDNiaC Před rokem +4

    What about something like this, instead of a while loop:
    let currentFloor = 0
    let result = 0
    for (let i = 0; i < brackets.length; i++) {
    const char = brackets[i]
    if (char === "(") currentFloor--
    else if (char === ")") currentFloor++
    if (currentFloor === -1) {
    result = i
    break
    }
    }

    • @PunkSage
      @PunkSage Před rokem

      Yeah, this is the clear solution. Unfortunately Theo is not a good at solving these problems. He could've probably failed if it was his live-coding session during the interview. Anyways we still got a decent knowledge about frontend technologies.

  • @baka_baca
    @baka_baca Před rokem

    Alright this sounds like a great way to brush up and level up on some skills!

  • @Leto2ndAtreides
    @Leto2ndAtreides Před rokem

    I'd have run through the string with a for loop and done +1 floor for ( and -1 for ), until I hit -1 on floor.

  • @Daniel_WR_Hart
    @Daniel_WR_Hart Před rokem +1

    "It's not about who's programming language is the best"
    *disagrees in APL/J/BQN*

  • @thepaulcraft957
    @thepaulcraft957 Před rokem +2

    3:35 typical lisp codebase

  • @MilanRodd
    @MilanRodd Před rokem

    That is awesome! Thnx 4 sharing :)

  • @goosechaser
    @goosechaser Před rokem

    Thank you for this video

  • @rammehar5531
    @rammehar5531 Před rokem +1

    May you pls explain ,What ares the requirement for site like leet-code e.g. handling compilation for multiple users and run test against the solution?

    • @palaaaurinkoon
      @palaaaurinkoon Před rokem

      There are a few good systems design videos on this:
      czcams.com/video/hmoqH48JV00/video.html

    • @samhadi7972
      @samhadi7972 Před rokem

      They most likely use docker with networking disabled and other limits to make it more safe to run on their servers

  • @QazJer
    @QazJer Před rokem

    can't sleep so I just completed the first day's challenges! pretty fun

  • @fnfal113
    @fnfal113 Před rokem

    copilot really solved the problem

  • @The_Nova_Glow
    @The_Nova_Glow Před 9 měsíci +3

    i stopped watching after he let copilot just carry him

  • @NiceTwisT
    @NiceTwisT Před rokem

    im doing this right now after a night shift to distress👌

  • @roberthogan7149
    @roberthogan7149 Před rokem

    I love to see fellow deadmau5 fans.

  • @moinbagban87
    @moinbagban87 Před 9 měsíci

    Vs code theme?

  • @JackstaGamez
    @JackstaGamez Před rokem +2

    new theo vid W

  • @perc-ai
    @perc-ai Před rokem +1

    Where are all my rustaceans at??

  • @OldKing11100
    @OldKing11100 Před rokem

    Roger Roger.

  • @Zzznmop
    @Zzznmop Před rokem

    PepeLaugh dis gonna be good!

  • @mrlectus
    @mrlectus Před rokem

    Their questions R clearer than leetcode

  • @d2vin
    @d2vin Před rokem

    Music used?

  • @tomaszchmielnicki8676

    Why not do it the functional way?

  • @invinciblemode
    @invinciblemode Před rokem +1

    Such a great dev lmao

  • @josephsintum1292
    @josephsintum1292 Před rokem

    In excel??

  • @ChillAutos
    @ChillAutos Před rokem +2

    Seems kinda weird if someone in a different timezone who's sleeping can never compete with it.

  • @xrehpicx
    @xrehpicx Před rokem

    Wt is that vscode theme

  • @Starnamics
    @Starnamics Před rokem +1

    nice

  • @trendy2826
    @trendy2826 Před rokem

    1:45

  • @simp-
    @simp- Před rokem

    how you get that smart autocompletes?

    • @rauldragu9447
      @rauldragu9447 Před rokem +5

      Its called github copilot and it costs 10$/month

    • @abhishek.rathore
      @abhishek.rathore Před rokem +1

      @@rauldragu9447 unless you are a student.. For them its free

    • @natescode
      @natescode Před rokem

      tabnine has a free tier

    • @simp-
      @simp- Před rokem

      @@rauldragu9447 Oh I completly forgot about that piece of software, thanks

    • @simp-
      @simp- Před rokem +1

      @@abhishek.rathore ohhh thats great for me then, thanks

  • @Richard-sp3ul
    @Richard-sp3ul Před rokem

    @theo 🤘🤘🤘

  • @SuperSaiyan-tr7fz
    @SuperSaiyan-tr7fz Před rokem

    Its is good and I know they wanted a minimal design. But they should focus more on readability and ui just the minimum would suffice.

  • @Pl15604
    @Pl15604 Před rokem

    I hope you did not ask LC questions interviewing candidates as a SWE at Twitch if you complain about LC :)

    • @georgejoseph2601
      @georgejoseph2601 Před rokem

      Guy is straight up the definition of someone who has most definitely done the LC grind but talks like he hasn’t

  • @TheSaintsVEVO
    @TheSaintsVEVO Před rokem

    tl;dw do advent of code

  • @HowPortal
    @HowPortal Před rokem +84

    Self pro claimed "great" dev.

  • @tonysecomm7050
    @tonysecomm7050 Před rokem +2

    I don't think you are a great dev. Stop tooting your own horn. Playing with React is not programming! 😀

    • @t3dotgg
      @t3dotgg  Před rokem +6

      Let me know if you make it into top 200 any day in aoc because I got it for both problems today :)

    • @io-er1ex
      @io-er1ex Před rokem

      I think he means better instead of great. But the word great has more power right? for more clicks 😀

    • @brunokingz
      @brunokingz Před 8 měsíci

      Did you? I only see copilot doing the work for you@@t3dotgg

  • @AndrewTSq
    @AndrewTSq Před 9 měsíci

    advent of code is really bad. Why!? well, day 1 problem 2. My code does everything that everyone else had problems with. But I am starting to think there is something wrong with the parsing of the data.. but who wants to check 1000 lines of text ? and even worse.. now I have to wait like 10 minutes before trying again. This is just a "Hey im so good coder" brag thing, and a really bad site that only accepts every 10 minutes. I hope someone does a adventure of code the right way, and not in this really bad way.

  • @Exiide89
    @Exiide89 Před rokem +1

    I haven't used leetcode ever.

  • @sammavrs
    @sammavrs Před rokem

    i couldnt find the video where Theo @t3dotgg talks about LeetCode. would love a link if someone can provide it? PLEASE AND THANK YOU :)

  • @johnpeterson8493
    @johnpeterson8493 Před rokem

    nice