Programming Live with Larry
Programming Live with Larry
  • 3 966
  • 2 087 457
2134. Minimum Swaps to Group All 1's Together II - Day 2/31 Leetcode August Challenge
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits!
Problem: leetcode.com/problems/minimum-swaps-to-group-all-1s-together-ii/
Twitch: www.twitch.tv/larryny
Discord: discord.gg/6QKRCdR
Instagram: larrysomewhere
#leetcode #coding #programming
Переглядів: 419

Відео

360. Sort Transformed Array (Leetcode Medium)
Переглядів 55День тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/sort-transformed-array/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
1062. Longest Repeating Substring - Week 1/5 Leetcode August Challenge
Переглядів 25213 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/longest-repeating-substring/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
2678. Number of Senior Citizens - Day 1/31 Leetcode August Challenge
Переглядів 15813 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/number-of-senior-citizens/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
1105. Filling Bookcase Shelves - Day 31/31 Leetcode July Challenge
Переглядів 70715 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/filling-bookcase-shelves/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
1265. Print Immutable Linked List in Reverse (Leetcode Medium)
Переглядів 19418 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/print-immutable-linked-list-in-reverse/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
1653. Minimum Deletions to Make String Balanced - Day 30/31 Leetcode July Challenge
Переглядів 52918 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/minimum-deletions-to-make-string-balanced/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
1230. Toss Strange Coins - Week 5/5 Leetcode July Challenge
Переглядів 21020 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/toss-strange-coins/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
Q4 is wrong?! Leetcode Weekly Contest 408 (sloppy) with commentary
Переглядів 27320 годин тому
Larry participates in the Leetcode Weekly Contest 408, ??? out of ???? Contest: leetcode.com/contest/weekly-contest-408 Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere 0:00 Start 1:00 Q1 2:03 Q2 7:45 Q3 11:21 Q4 Q1 - ua-cam.com/video/W8skeqGmH6I/v-deo.html Q2 - ua-cam.com/video/4sF1v0YuTvM/v-deo.html Q3 - ua-cam.com/video/LqNVe_LLbPQ/v-deo.html...
1395. Count Number of Teams - Day 29/31 Leetcode July Challenge
Переглядів 41720 годин тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/count-number-of-teams/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
2045. Second Minimum Time to Reach Destination - Day 28/31 Leetcode July Challenge
Переглядів 71223 години тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/second-minimum-time-to-reach-destination/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
3234. Count the Number of Substrings With Dominant Ones (Leetcode Medium)
Переглядів 73523 години тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/count-the-number-of-substrings-with-dominant-ones/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
3232. Find if Digit Game Can Be Won (Leetcode Easy)
Переглядів 15023 години тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/find-if-digit-game-can-be-won/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
3233. Find the Count of Numbers Which Are Not Special (Leetcode Medium)
Переглядів 53623 години тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/find-the-count-of-numbers-which-are-not-special/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
3235. Check if the Rectangle Corner Is Reachable (Leetcode Hard)
Переглядів 29723 години тому
Larry solves and analyzes this Leetcode problem as both an interviewer and an interviewee. This is a live recording of a real engineer solving a problem live - no cuts or edits! Problem: leetcode.com/problems/check-if-the-rectangle-corner-is-reachable/ Twitch: www.twitch.tv/larryny Discord: discord.gg/6QKRCdR Instagram: larrysomewhere #leetcode #coding #programming
2976. Minimum Cost to Convert String I - Day 27/31 Leetcode July Challenge
Переглядів 526День тому
2976. Minimum Cost to Convert String I - Day 27/31 Leetcode July Challenge
1334. Find the City With the Smallest Number of Neighbors at... - Day 26/31 Leetcode July Challenge
Переглядів 448День тому
1334. Find the City With the Smallest Number of Neighbors at... - Day 26/31 Leetcode July Challenge
707. Design Linked List (Leetcode Medium)
Переглядів 223День тому
707. Design Linked List (Leetcode Medium)
912. Sort an Array - Day 25/31 Leetcode July Challenge
Переглядів 537День тому
912. Sort an Array - Day 25/31 Leetcode July Challenge
2191. Sort the Jumbled Numbers - Day 24/31 Leetcode July Challenge
Переглядів 289День тому
2191. Sort the Jumbled Numbers - Day 24/31 Leetcode July Challenge
1516. Move Sub-Tree of N-Ary Tree (Leetcode Hard)
Переглядів 174День тому
1516. Move Sub-Tree of N-Ary Tree (Leetcode Hard)
1636. Sort Array by Increasing Frequency - Day 23/31 Leetcode July Challenge
Переглядів 258День тому
1636. Sort Array by Increasing Frequency - Day 23/31 Leetcode July Challenge
2093. Minimum Cost to Reach City With Discounts - Week 4/5 Leetcode July Challenge
Переглядів 278День тому
2093. Minimum Cost to Reach City With Discounts - Week 4/5 Leetcode July Challenge
2418. Sort the People - Day 22/31 Leetcode July Challenge
Переглядів 280День тому
2418. Sort the People - Day 22/31 Leetcode July Challenge
3225. Maximum Score From Grid Operations (Leetcode Hard)
Переглядів 1 тис.День тому
3225. Maximum Score From Grid Operations (Leetcode Hard)
2392. Build a Matrix With Conditions - Day 21/31 Leetcode July Challenge
Переглядів 385День тому
2392. Build a Matrix With Conditions - Day 21/31 Leetcode July Challenge
Mind Games! Leetcode Weekly Contest 407 (blown) with commentary
Переглядів 385День тому
Mind Games! Leetcode Weekly Contest 407 (blown) with commentary
3229. Minimum Operations to Make Array Equal to Target (Leetcode Hard)
Переглядів 346День тому
3229. Minimum Operations to Make Array Equal to Target (Leetcode Hard)
3228. Maximum Number of Operations to Move Ones to the End (Leetcode Medium)
Переглядів 307День тому
3228. Maximum Number of Operations to Move Ones to the End (Leetcode Medium)
3227. Vowels Game in a String (Leetcode Medium)
Переглядів 301День тому
3227. Vowels Game in a String (Leetcode Medium)

КОМЕНТАРІ

  • @qulinxao
    @qulinxao 11 годин тому

    l,f=len(n),sum(n); o=t=sum(n[:f]) for i,v in enumerate(n,f): o=max(o,t:=t+n[i%l]-v) return f-o

  • @redfinance3403
    @redfinance3403 16 годин тому

    I was pretty happy with myself on this one. Solved and coded it in 5 mins! 🎉

  • @tuandino6990
    @tuandino6990 День тому

    I also thought that we can only swap adjacent numbers ... Same boat

  • @kumarjivi1697
    @kumarjivi1697 День тому

    Love your videos Larry! Very good job 👍

  • @Algorithmist
    @Algorithmist День тому

    Did you get all the ones together?

  • @Algorithmist
    @Algorithmist День тому

    Were you able to transform the array?

  • @user-wy5es3xx2t
    @user-wy5es3xx2t День тому

    so I need that fire, what should I do to keep it burning??

    • @Algorithmist
      @Algorithmist День тому

      you have to figure out what you want, how you want it, and how to get there, the rest will figure itself out

  • @soumyajitganguly2593
    @soumyajitganguly2593 День тому

    thanks for showing all the ways Larry.. I solved this using 3 variable top-down DP but now after watching your video my understanding of the sub-problems are solidified.

  • @Algorithmist
    @Algorithmist 2 дні тому

    Did you repeat yourself?

  • @Algorithmist
    @Algorithmist 2 дні тому

    How senior are your citizens?

  • @user-vs3jn4xi4x
    @user-vs3jn4xi4x 2 дні тому

    Had a doubt... if the condition of breaking due to width (when the current width accumulated is more than the shelf-width ) occurs, the (offset + index) points to that particular book which hasn't been placed yet. So when you call for the recursive function why do you start from (offset +index + "1")? we should start with the current book which is not placed right? i.e ( index +offset+1).

    • @Algorithmist
      @Algorithmist День тому

      it breaks so it does not do the recursion - also this is why you have to define the function carefully

  • @chetan8395
    @chetan8395 2 дні тому

    i am facing same issue with (x1,y1,r1) and (y1,x1,r1) , not able to submit , i think need to verify if mid point of intersection present in rectangle

  • @alexander6233
    @alexander6233 2 дні тому

    Oh man, you are so sloppy :D

  • @Algorithmist
    @Algorithmist 3 дні тому

    How are you handling the bookshelves?

    • @user-vs3jn4xi4x
      @user-vs3jn4xi4x 2 дні тому

      dk man not able to solve the questions these days... I thought I will not miss any month this time... But its happening a lot lately... I did april and june.But this july is just hard...And copying Solutions doesn't feel right... I just want to be good at it.

    • @redfinance3403
      @redfinance3403 2 дні тому

      @@user-vs3jn4xi4xdw bro I am also not able to solve certain questions in the past few days and I’m a knight! (I feel my skill is at a low). Some of these are harder than contest questions. Ig this is just part of the learning process.

  • @MangoTroll34
    @MangoTroll34 3 дні тому

    This problem really confused me. Looks like DP (remove or keep) but that is really hard to write.

  • @kumarjivi1697
    @kumarjivi1697 3 дні тому

    Initializing best=right_a was a good one. I made a mistake of initializing best=N

  • @qulinxao
    @qulinxao 3 дні тому

    v=[0,0] for c in [ord(c)-97 for c in s]: v[c]=max(v[0],v[c])+1 return len(s)-max(v)

  • @MadTofan
    @MadTofan 3 дні тому

    had to draw again to really understand this logic, but really elegant solution. Love it, thank you!

  • @_NickTech
    @_NickTech 3 дні тому

    I’ve never heard about sleep sort, thanks for telling about it 😅 And I was surprised to see square decomposition here 👍🏻

  • @user-vs3jn4xi4x
    @user-vs3jn4xi4x 3 дні тому

    why best initialised with right _a?

    • @xinyangyuan
      @xinyangyuan 3 дні тому

      since there is nothing on the left, the total changes we need to make the string valid is to delete every "a".

    • @Algorithmist
      @Algorithmist 3 дні тому

      for consistency, you can initialize it with left_b + right_a, but left_b is 0.

  • @shivamgulati3038
    @shivamgulati3038 3 дні тому

    hi larry i have a question you make such a good content who do you have so much less views and subscribers you definately deserve more than this . Im learning a lot from you videos Thanks for these.

  • @Algorithmist
    @Algorithmist 3 дні тому

    Did you put this problem on reverse?

  • @krityaan
    @krityaan 3 дні тому

    Sleep sort would unironically work here! haha

  • @chrischika7026
    @chrischika7026 3 дні тому

    did ok

  • @chrischika7026
    @chrischika7026 3 дні тому

    muscle confusion 12:34

  • @Algorithmist
    @Algorithmist 4 дні тому

    Did you keep the problem balanced?

  • @Justmonumasih
    @Justmonumasih 4 дні тому

    Hi sir, i am from india 🥲🙁

  • @shubhamraj1064
    @shubhamraj1064 4 дні тому

    Hey Larry I could see you selecting or deleting whole line of text pretty fast (I guess without using mouse). How do you do that? Are there any keyboard shortcuts for that?

    • @Algorithmist
      @Algorithmist 4 дні тому

      I'm using OSX, so not sure about other systems!

  • @_PINAKIBANERJEE_CSEA
    @_PINAKIBANERJEE_CSEA 4 дні тому

    I got 2 tles on Q2 before realising I have set the sieve limit to 1e6 instead of 1e5 lol ;(

  • @user-vs3jn4xi4x
    @user-vs3jn4xi4x 4 дні тому

    this was awesome

  • @MaksymKondratiuk
    @MaksymKondratiuk 4 дні тому

    Thanks for the video. Btw, I think calculating an answer in one go is easier to understand compared to calling it twice with reversing an input def get_answer(smaller_left, smaller_right): ans = 0 for i in range(N): left_smaller = smaller_left[i] right_bigger = N - smaller_right[i] - i - 1 left_bigger = i - smaller_left[i] right_smaller = smaller_right[i] ans += left_smaller * right_bigger ans += left_bigger * right_smaller return ans

  • @tejaannamdevula8592
    @tejaannamdevula8592 5 днів тому

    can you make a video on sorted Containers

    • @Algorithmist
      @Algorithmist 4 дні тому

      It's just a standard library, can use as a black box!

  • @Algorithmist
    @Algorithmist 5 днів тому

    Were your coins strange?

  • @Algorithmist
    @Algorithmist 5 днів тому

    How did you do this contest?

    • @Rohinth
      @Rohinth 4 дні тому

      Solved first 3 problems in 50 minutes + 3 WA

  • @Algorithmist
    @Algorithmist 5 днів тому

    How many teams were you able to form?

  • @akshaychavan5511
    @akshaychavan5511 5 днів тому

    The approach that implemented while solving in the contest gave TLE. And now I could see that many C++ folks got it correct using the same approach.

  • @soumyajitganguly2593
    @soumyajitganguly2593 5 днів тому

    ooof this was a really tough one for me.. thanks for the clear explanation and code larry!

  • @user-vs3jn4xi4x
    @user-vs3jn4xi4x 5 днів тому

    This is so well written! Its like classical music I Strive to reach such levels! took me some time. but wow.

    • @user-vs3jn4xi4x
      @user-vs3jn4xi4x 5 днів тому

      oh did have a doubt why that first two if and elif cases? I couldn't understand those!

  • @jaideepkukkadapu2600
    @jaideepkukkadapu2600 5 днів тому

    Thanks for solving every week for us : )

  • @bagelxp
    @bagelxp 5 днів тому

    Thank you for the explaination Larry!

  • @valentineezeonyeka9788
    @valentineezeonyeka9788 5 днів тому

    Is there any of your videos where you explained in details how to implement Dijkstra and floyd-warshall algorithms?

    • @Algorithmist
      @Algorithmist 5 днів тому

      Probably not - I think there are good resources out there in general to learn the specific algorithms so I tend to not go over them in too much details unless it is problem specific

    • @valentineezeonyeka9788
      @valentineezeonyeka9788 4 дні тому

      @@Algorithmist Alright thanks

  • @RakeshChoudhary-sv9sy
    @RakeshChoudhary-sv9sy 5 днів тому

    💗💗

  • @arjunkhanna2450
    @arjunkhanna2450 5 днів тому

    I almost did apply the exact same logic but still couldn't wrap my head around some corner cases. This video really helped me learn about how to go about solving a problem. Thanks :)

  • @Algorithmist
    @Algorithmist 5 днів тому

    Did you get around to the final destination?

  • @ankurtiwari5451
    @ankurtiwari5451 5 днів тому

    got tle in the contest while solving

  • @Algorithmist
    @Algorithmist 6 днів тому

    Do you feel sorry for Bob?

  • @Algorithmist
    @Algorithmist 6 днів тому

    How special are your numbers?

  • @Algorithmist
    @Algorithmist 6 днів тому

    Did you dominate this problem?

  • @Algorithmist
    @Algorithmist 6 днів тому

    Did you get your corners covered?

  • @Dota2Vibes
    @Dota2Vibes 6 днів тому

    Good stuff