Algorithms Casts
Algorithms Casts
  • 679
  • 414 083
Leetcode 2914: Minimum Number of Changes to Make Binary String Beautiful
#leetcodechallenge #coding #algorithms
🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts
🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice
Problem: leetcode.com/problems/minimum-number-of-changes-to-make-binary-string-beautiful/description/
#leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview
⭐ ⭐ MEDUIM LEETCODE PROBLEMS EXPLANATIONS: ua-cam.com/video/m0J1Q2EbvOc/v-deo.html
⭐ ⭐ ⭐ HARD LEETCODE PROBLEMS EXPLANATIONS: ua-cam.com/video/EzDnB7Ayv08/v-deo.html
▬▬▬▬▬▬▬▬▬▬▬▬
leetcode weekly contest, weekly contest, leetcode, google coding interview, Leetcode 2914, leetcode 2914, Leetcode 2914. Minimum Number of Changes to Make Binary String Beautiful,
Leetcode 2914: Minimum Number of Changes to Make Binary String Beautiful, Minimum Number of Changes to Make Binary String Beautiful, biweekly contest, weekly contest, daily leetcode challenge, neetcode, neetcodeio, larry, dynamic programming, recursion, memoization, array, assignment
Переглядів: 20

Відео

Leetcode 3163: String Compression III
Переглядів 452 години тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/string-compression-iii/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleintervi...
Leetcode 3342: Find Minimum Time to Reach Last Room II
Переглядів 554 години тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/find-minimum-time-to-reach-last-room-ii/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codingintervi...
Leetcode 3341: Find Minimum Time to Reach Last Room I
Переглядів 1154 години тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/find-minimum-time-to-reach-last-room-i/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codingintervie...
Leetcode 796. Rotate String
Переглядів 1274 години тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/rotate-string/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ ME...
Leetcode 1957: Delete Characters to Make Fancy String
Переглядів 1989 годин тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/delete-characters-to-make-fancy-string/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codingintervie...
Leetcode 2463: Minimum Total Distance Traveled
Переглядів 1999 годин тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/minimum-total-distance-traveled/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #goog...
Leetcode 1671: Minimum Number of Removals to Make Mountain Array
Переглядів 2914 годин тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/minimum-number-of-removals-to-make-mountain-array/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #cod...
Leetcode 1701: Average Waiting Time
Переглядів 1903 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/average-waiting-time/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview...
Leetcode 1823: Find the Winner of the Circular Game
Переглядів 993 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/find-the-winner-of-the-circular-game/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview ...
Leetcode 3208: Alternating Groups II
Переглядів 1213 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/alternating-groups-ii/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleintervie...
Leetcode 3212. Count Submatrices With Equal Frequency of X and Y
Переглядів 1513 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/count-submatrices-with-equal-frequency-of-x-and-y/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #cod...
Leetcode 3211: Generate Binary Strings Without Adjacent Zeros
Переглядів 2913 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/generate-binary-strings-without-adjacent-zeros/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #coding...
Leetcode 1518: Water Bottles
Переглядів 1913 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/water-bottles/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ ME...
Leetcode 3207: Maximum Points After Enemy Battles
Переглядів 973 місяці тому
#leetcodechallenge #coding #algorithms 🥷 1:1 coding interviews and leetcode problems coaching, Book a session with me on Superpeer: superpeer.com/algorithmscasts 🐮 Support the channel on Patreon: www.patreon.com/algorithmspractice Problem: leetcode.com/problems/maximum-points-after-enemy-battles/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #g...
Leetcode 3206 Alternating Groups I
Переглядів 2633 місяці тому
Leetcode 3206 Alternating Groups I
Leetcode 2582: Pass the Pillow
Переглядів 2023 місяці тому
Leetcode 2582: Pass the Pillow
Leetcode 2058: Find the Minimum and Maximum Number of Nodes Between Critical Points
Переглядів 523 місяці тому
Leetcode 2058: Find the Minimum and Maximum Number of Nodes Between Critical Points
Leetcode 2037: Minimum Number of Moves to Seat Everyone
Переглядів 1004 місяці тому
Leetcode 2037: Minimum Number of Moves to Seat Everyone
Leetcode 75: Sort Colors
Переглядів 734 місяці тому
Leetcode 75: Sort Colors
Leetcode 3180: Maximum Total Reward Using Operations I
Переглядів 1944 місяці тому
Leetcode 3180: Maximum Total Reward Using Operations I
Leetcode 1122: Relative Sort Array
Переглядів 714 місяці тому
Leetcode 1122: Relative Sort Array
Leetcode 3179: Find the N-th Value After K Seconds
Переглядів 1314 місяці тому
Leetcode 3179: Find the N-th Value After K Seconds
Leetcode 3178: Find the Child Who Has the Ball After K Seconds
Переглядів 1364 місяці тому
Leetcode 3178: Find the Child Who Has the Ball After K Seconds
Leetcode 1051: Height Checker
Переглядів 664 місяці тому
Leetcode 1051: Height Checker
Leetcode 846: Hand of Straights
Переглядів 674 місяці тому
Leetcode 846: Hand of Straights
Leetcode 1002: Find Common Characters
Переглядів 534 місяці тому
Leetcode 1002: Find Common Characters
Leetcode 2441: Largest Positive Integer That Exists With Its Negative
Переглядів 1426 місяців тому
Leetcode 2441: Largest Positive Integer That Exists With Its Negative
Leetcode 2000: Reverse Prefix of Word
Переглядів 1606 місяців тому
Leetcode 2000: Reverse Prefix of Word
Leetcode 988: Smallest String Starting From Leaf
Переглядів 666 місяців тому
Leetcode 988: Smallest String Starting From Leaf

КОМЕНТАРІ

  • @punk5513
    @punk5513 4 години тому

    Great🔥🫡

  • @aryanaheriit-kgp5200
    @aryanaheriit-kgp5200 22 години тому

    THANKS!

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

    🔥🔥🫡

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

    We can use a hashset instead of a hashmap, because we aren't using the values in the hashmap in any way.

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

    Subbed🙌🔥

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

    Thank you!

  • @ei-python
    @ei-python 4 дні тому

    Nice, my pretty version 192ms: ua-cam.com/video/u5ttDKBDGJw/v-deo.html ^^

    • @ei-python
      @ei-python 4 дні тому

      class Solution: def makeFancyString(self, s: str) -> str: if len(s) < 3: return s result = [s[0], s[1]] for c in s[2::]: # O(n) if result[-1] != c or result[-2] != c: result.append(c) return "".join(result)

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

    class Solution: def makeFancyString(self, s: str) -> str: result = [] for char in s: if len(result) < 2 or not (result[-1] == char and result[-2] == char): result.append(char) return ''.join(result)

  • @shaboatMrad
    @shaboatMrad 7 днів тому

    I really like your videos. Any resource recommendations where you've learned from?

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

      thank you, mainly doing leetcode problems and researching topics i couldn't solve, i also used a couple of books: i made reviews about them in the channel, playlist: ua-cam.com/play/PLqdRJlwIuryP8LSBMEQoPLlCufFo4Hc15.html

  • @venkatasaigunda8146
    @venkatasaigunda8146 9 днів тому

    The only explanation that helped me actually understand what is going on, Thanks!

  • @davidlaidbiggestfan
    @davidlaidbiggestfan 11 днів тому

    Really good

  • @PauloBriceño-b4l
    @PauloBriceño-b4l 11 днів тому

    I like your solution! Thanks for the explained drawings

  • @pratikgehlot1973
    @pratikgehlot1973 15 днів тому

    Good explanation!

  • @janhavichoudhari5703
    @janhavichoudhari5703 17 днів тому

    Very well explained! Thank you!

  • @maralazizi
    @maralazizi 19 днів тому

    Thank you so much for great explanation. I love watching your videos. Much appreciated!

  • @thicccatto3956
    @thicccatto3956 20 днів тому

    She deserves way more subscribers than she has optimized and creative solution as always 💯

  • @posamokshith4326
    @posamokshith4326 22 дні тому

    thank you

  • @andresarango4262
    @andresarango4262 23 дні тому

    Good job

  • @gamefun2525
    @gamefun2525 24 дні тому

    Great explanation. This algorithm can be directly applied to the LeetCode problem 2406.

    • @nikhilvasu478
      @nikhilvasu478 24 дні тому

      lol i also came here after todays Daily problem 2406, i understood the priority queue approach but this method can also be used for many interval based qns .

  • @devj100
    @devj100 25 днів тому

    Nice explanation. The nested call to set() function will make the overall complexity O(n * minLength)

  • @araneuskyuro
    @araneuskyuro 27 днів тому

    You're the best

  • @thicccatto3956
    @thicccatto3956 Місяць тому

    Amazing vid + i learned something new on how to work with queues. You got a subscriber

  • @araneuskyuro
    @araneuskyuro Місяць тому

    Underrated channel. I love these! Thank you :)

  • @marcgrab
    @marcgrab Місяць тому

    Brilliant. Thank you for putting it together.

  • @freddyhaug9379
    @freddyhaug9379 Місяць тому

    This question was diffuclt for me, I understood we needed a prefix sum and I could see similiarties to two sum but when i began writing down the solution on paper my brain just cramped. The solutions on leetcode were not helping either. I'm glad I found your video! it was very clear, I may have to watch a few times to gain some of intution you have. Thanks!

  • @maralazizi
    @maralazizi Місяць тому

    Thank you so much for great content. I love watching your solutions, so easy to follow!

  • @midhileshmomidi3120
    @midhileshmomidi3120 Місяць тому

    Absolute exaplanation !! Thank you

  • @VanjeAv
    @VanjeAv Місяць тому

    Amazing explanation thank you

  • @HarisHussain
    @HarisHussain Місяць тому

    Awesome explanation

  • @AbdulCherchar
    @AbdulCherchar Місяць тому

    Thank you!

  • @trh786fed
    @trh786fed Місяць тому

    Whoever made this problem I hope both sides of your pillow are warm

  • @ericyoung4542
    @ericyoung4542 Місяць тому

    Hi, thanks for the solution. However, it doesn't seem to work any more for some test cases. For the two test cases below, if you change the order of the two for-loop, one of them will fail. [[2, 1, 1, 1, 1, 2, 2, 1, 0], [0, 0, 1, 2, 0, 0, 0, 2, 2], [2, 0, 2, 2, 1, 2, 1, 0, 0]] [[2, 3, 0, 0, 1, 0, 1, 2, 1], [0, 1, 3, 3, 0, 0, 2, 2, 0]]

  • @AuthorD
    @AuthorD Місяць тому

    Good One, keep this up

  • @biruk3552
    @biruk3552 2 місяці тому

    thank you for this

  • @EyobDerese-t8d
    @EyobDerese-t8d 2 місяці тому

    what happen if the two monkey swap there place in case of even number vertex, isn't other possibility to avoid a collision?

  • @MohitSinha4
    @MohitSinha4 2 місяці тому

    Nice explanation!

  • @sanooosai
    @sanooosai 2 місяці тому

    thank you

  • @AndyWallWasWeak
    @AndyWallWasWeak 2 місяці тому

    where does actual backtracking happens in code?

  • @andrewcenteno3462
    @andrewcenteno3462 2 місяці тому

    That was an incredible explanation

  • @AdityaMishra-ji8nm
    @AdityaMishra-ji8nm 2 місяці тому

    Superb Explanation

  • @Jit_hiL
    @Jit_hiL 3 місяці тому

    which drawing device you are using?

  • @shraveenb.s3983
    @shraveenb.s3983 3 місяці тому

    such an amazing soln. How did you come up with the last return statement. That line is magical

  • @nareshgusain641
    @nareshgusain641 3 місяці тому

    thank you and love from India

  • @eaglefacts990
    @eaglefacts990 3 місяці тому

    Hey Bro Youre Arab right? Nice Explaination by the way.

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 3 місяці тому

    NICE SUPER EXCELLENT MOTIVATED

  • @abhishekmittal1302
    @abhishekmittal1302 4 місяці тому

    so it means i was able to solve 90% of this problem on my own but i rather than dividing c/e[0], i was doing every loop which gave me tle. and whole time during contest i was thinking how to even convert it into O(N) 🙂

  • @gaureesha9840
    @gaureesha9840 4 місяці тому

    thanks!!

  • @mhashmi3593
    @mhashmi3593 4 місяці тому

    No idea about the other solutions you've solved. But this one is really simplified and nice way to explain. You've made it piece of cake and I was able to solve few other hard Leetcode questions with simply by swaps. Keep it up don't worry about number of views or comments. Cheers

  • @deep8843
    @deep8843 4 місяці тому

    good explanation

  • @jnayehsirine6222
    @jnayehsirine6222 4 місяці тому

    best video for this problem ! thhanks