Tesla Coding Interview Question! - Maximum Number of Balloons - Leetcode 1189

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024
  • FAANG Coding Interviews / Data Structures and Algorithms / Leetcode

ความคิดเห็น • 28

  • @GregHogg
    @GregHogg  5 หลายเดือนก่อน +5

    Master Data Structures & Algorithms For FREE at AlgoMap.io!

  • @RochRich.
    @RochRich. 5 หลายเดือนก่อน +91

    I swear the solution is always to make a hash map and count occurrences

    • @shrayesraman5192
      @shrayesraman5192 5 หลายเดือนก่อน +9

      Cuz hash maps are incredibly efficient with constant look up for keys

    • @CoolExcite
      @CoolExcite 5 หลายเดือนก่อน +2

      To be fair there's only like 4 data structures you need for most interview questions

    • @yazidmo9399
      @yazidmo9399 5 หลายเดือนก่อน +1

      ​@CoolExcite and they are ?

    • @belphegor32
      @belphegor32 5 หลายเดือนก่อน

      @@yazidmo9399array, hashmap, queue, graph, maybe. Other can be implemented with these

    • @CoolExcite
      @CoolExcite 5 หลายเดือนก่อน +9

      ​@@yazidmo9399 Generic lists and hashmaps/sets cover around half the problems. Tree problems (mainly linked lists) and stacks/queues (more often stacks) are also fairly common. Knowing those data structures and string manipulation cover a large majority of all questions I've been asked.
      Heaps and non-tree graphs may also come up if you're at somewhere with tough interviews

  • @MikeWmusic10
    @MikeWmusic10 4 หลายเดือนก่อน +2

    The description of the question premise could be a little better tbh

    • @GregHogg
      @GregHogg  4 หลายเดือนก่อน

      Sorry about that!!

  • @RedHair651
    @RedHair651 5 หลายเดือนก่อน +7

    You're the only person I see embed coding solutions into a Solution class, but you do it consistently, so there must be a reason. Could you make a video or short on the benefits of this? Online resources that you may have on hand also works.

    • @matthiasprodani
      @matthiasprodani 5 หลายเดือนก่อน +13

      Default on leetcode

    • @JustinLietz
      @JustinLietz 5 หลายเดือนก่อน +5

      It’s so leetcode can perform testing on it, this is the leetcode editor he’s displaying

    • @shrayesraman5192
      @shrayesraman5192 5 หลายเดือนก่อน +1

      That's how leetcode formats problems

    • @deepindersingh2007
      @deepindersingh2007 4 หลายเดือนก่อน

      If you remove it, you will see errors you have never seen in your life before

  • @hampuztt
    @hampuztt 5 หลายเดือนก่อน +4

    I dont know why i even watch your solutions, they're always suboptimal

    • @arsheyajain7055
      @arsheyajain7055 5 หลายเดือนก่อน

      Pretty sure you’re thinking of yourself when you’re saying suboptimal.

    • @jayraval2846
      @jayraval2846 5 หลายเดือนก่อน

      😂😂​@@arsheyajain7055

  • @phill6859
    @phill6859 5 หลายเดือนก่อน +1

    Your questions are always more cryptic than the answers. If this is the state of interview coding questions then I am walking out, I won't work anywhere they can't describe the problem properly.

    • @TargunYssboern
      @TargunYssboern 5 หลายเดือนก่อน

      No, he's an algoritm scammer - you need to watch his shorts several times trying to figure out what the poorly described problem is, and then aim precisely to pause at the code visible for 0.5s. And YT algorithm LOVES THIS. Sriously fuck this guy.

    • @GreatTaiwan
      @GreatTaiwan 4 หลายเดือนก่อน

      In all fairness what client describes problem probably ?
      How many times u work with jr who want help in something they can’t even describe ?

  • @sanasainath7758
    @sanasainath7758 5 หลายเดือนก่อน

    Nice

  • @user-cg7gd5pw5b
    @user-cg7gd5pw5b 4 หลายเดือนก่อน +1

    I'm pretty sure it's a trick question and they're expecting you to think outside the box by thinking mathematically through the permutations.
    It's way faster, simpler, shows more knowledge, and can be done without a computer. The only thing is that you have to forget the context of the interview hence the difficulty of considering that solution.

    • @GreatTaiwan
      @GreatTaiwan 4 หลายเดือนก่อน

      So a coding / software engineer question goal is not to write code 😂
      And no there’s no trick in it

    • @user-cg7gd5pw5b
      @user-cg7gd5pw5b 4 หลายเดือนก่อน

      @@GreatTaiwan Tesla is hiring researchers, not simple coders. If an engineer working with SOTA AI doesn't have the least beat of knowledge abour probability, then you know he's gonna be useless.
      And even if we ignored that fact, who's the one you'll hire in priority? The one who thinks the problem through and through to reduce the complexity as much as possible or the one who codes right away? My solution reduces the complexity by a factor of 3. You're gonna tell me that it is NOT what a good company would be looking for? If you've ever passed a coding interview, then you'll know that it's quite litteraly the onky thing that interests them.

  • @demonicedone
    @demonicedone 5 หลายเดือนก่อน

    😂 were the e and k went ..