Algorithms Casts
Algorithms Casts
  • 671
  • 404 411
Leetcode 1701: Average Waiting Time
#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
⭐ ⭐ 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 1701, leetcode 1701, Leetcode 1701: Average Waiting Time,
Leetcode 1701. Average Waiting Time, Average Waiting Time, biweekly contest, weekly contest, daily leetcode challenge, neetcode, neetcodeio, larry, bit manipulation, binary, xor operation, breadth first search, bfs, recursion, mathtwo pointers, string, binary manipulation, bit manipulation, binary, recursion, dynamic programming, kmp, prefix, string, prefix, suffix, brute force, matrix,geometry, brute force, prefix sum, hashmap brute force, sliding window, mean heap, geapq,
Переглядів: 148

Відео

Leetcode 1823: Find the Winner of the Circular Game
Переглядів 832 місяці тому
#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
Переглядів 1072 місяці тому
#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
Переглядів 1422 місяці тому
#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
Переглядів 2572 місяці тому
#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
Переглядів 1812 місяці тому
#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
Переглядів 822 місяці тому
#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
Переглядів 2322 місяці тому
🥷 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-i/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCODE PROBLEMS EXPLANATI...
Leetcode 2582: Pass the Pillow
Переглядів 1952 місяці тому
🥷 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/pass-the-pillow/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCODE PROBLEMS EXPLANATIONS: ...
Leetcode 2058: Find the Minimum and Maximum Number of Nodes Between Critical Points
Переглядів 472 місяці тому
🥷 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-minimum-and-maximum-number-of-nodes-between-critical-points/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #google...
Leetcode 2037: Minimum Number of Moves to Seat Everyone
Переглядів 963 місяці тому
🥷 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-moves-to-seat-everyone/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCOD...
Leetcode 75: Sort Colors
Переглядів 703 місяці тому
🥷 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/sort-colors/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCODE PROBLEMS EXPLANATIONS: ua-c...
Leetcode 3180: Maximum Total Reward Using Operations I
Переглядів 1783 місяці тому
This week's leetcode weekly contest: Weekly Contest 401 🥷 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-total-reward-using-operations-i/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorit...
Leetcode 1122: Relative Sort Array
Переглядів 633 місяці тому
🥷 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/relative-sort-array/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCODE PROBLEMS EXPLANATIO...
Leetcode 3179: Find the N-th Value After K Seconds
Переглядів 1223 місяці тому
🥷 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-n-th-value-after-k-seconds/description/ #leetcode #python #leetcodedailychallenge #leetcodedaily #algorithm #codinginterview #googleinterview ⭐ ⭐ MEDUIM LEETCODE PRO...
Leetcode 3178: Find the Child Who Has the Ball After K Seconds
Переглядів 1103 місяці тому
Leetcode 3178: Find the Child Who Has the Ball After K Seconds
Leetcode 1051: Height Checker
Переглядів 573 місяці тому
Leetcode 1051: Height Checker
Leetcode 846: Hand of Straights
Переглядів 593 місяці тому
Leetcode 846: Hand of Straights
Leetcode 1002: Find Common Characters
Переглядів 503 місяці тому
Leetcode 1002: Find Common Characters
Leetcode 2441: Largest Positive Integer That Exists With Its Negative
Переглядів 1404 місяці тому
Leetcode 2441: Largest Positive Integer That Exists With Its Negative
Leetcode 2000: Reverse Prefix of Word
Переглядів 1484 місяці тому
Leetcode 2000: Reverse Prefix of Word
Leetcode 988: Smallest String Starting From Leaf
Переглядів 635 місяців тому
Leetcode 988: Smallest String Starting From Leaf
Leetcode 129: Sum Root to Leaf Numbers
Переглядів 915 місяців тому
Leetcode 129: Sum Root to Leaf Numbers
Leetcode 404: Sum of Left Leaves
Переглядів 1455 місяців тому
Leetcode 404: Sum of Left Leaves
Leetcode 402: Remove K Digits
Переглядів 1045 місяців тому
Leetcode 402: Remove K Digits
Leetcode 2073: Time Needed to Buy Tickets
Переглядів 425 місяців тому
Leetcode 2073: Time Needed to Buy Tickets
Leetcode 1700: Number of Students Unable to Eat Lunch
Переглядів 695 місяців тому
Leetcode 1700: Number of Students Unable to Eat Lunch
Leetcode 1614: Maximum Nesting Depth of the Parentheses
Переглядів 445 місяців тому
Leetcode 1614: Maximum Nesting Depth of the Parentheses
Leetcode 205: Isomorphic Strings
Переглядів 695 місяців тому
Leetcode 205: Isomorphic Strings
Leetcode 3101: Count Alternating Subarrays
Переглядів 3156 місяців тому
Leetcode 3101: Count Alternating Subarrays

КОМЕНТАРІ

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

    Brilliant. Thank you for putting it together.

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

    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 12 днів тому

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

  • @midhileshmomidi3120
    @midhileshmomidi3120 16 днів тому

    Absolute exaplanation !! Thank you

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

    Amazing explanation thank you

  • @HarisHussain
    @HarisHussain 18 днів тому

    Awesome explanation

  • @AbdulCherchar
    @AbdulCherchar 21 день тому

    Thank you!

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

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

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

    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 24 дні тому

    Good One, keep this up

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

    thank you for this

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

    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 Місяць тому

    Nice explanation!

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

    thank you

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

    where does actual backtracking happens in code?

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

    That was an incredible explanation

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

    Superb Explanation

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

    which drawing device you are using?

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

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

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

    thank you and love from India

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

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

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

    NICE SUPER EXCELLENT MOTIVATED

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

    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 2 місяці тому

    thanks!!

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

    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 2 місяці тому

    good explanation

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

    best video for this problem ! thhanks

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

    Thank you for this simple explanation!

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

    Thanks, great description.

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

    Thank you so much. I love the clean solution. Subscribed, looking forward to see more videos from you in coming days.

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

    Hi ! Thanks for the awesome explanation The above code fails for one test case (might have been upated) words = ["A","B"] , result = "A". I think the what they mean by no leading zeors is valid if the number if of length >= 2. Here we can see that the requirement is that B has to be zero!. Hence no leadning zeroes is applicable only if len(word) > 1. 2 minor fixes fixed the code for me. One was this : here we can use 0 even if the column == len(word)-1 if and only if the word is itself of length 1 # digit assignment already exists -> use it if letter in letterToDigit and not (letterToDigit[letter] == 0 and column == len(word) - 1 and len(word) > 1): return search(column, row + 1, bal + sign * letterToDigit[letter]) The other fix was Here we skip zero assignment even if column == len(words)-1 if and only if len(words) > 1. for d, c in enumerate(digitToLetter): if c is None: # the second condition is to prevent leading 0s if d == 0: if len(word) > 1 and column == len(word)-1: continue Again, thanks for the awesome explanation.

  • @user-ys6ro4wi3f
    @user-ys6ro4wi3f 3 місяці тому

    Thank you!

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

    Very important. ❤great

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

    that's just awesome. I was confused over the prefix sum In 2d array

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

    From minite around 22, I believe in the matrix, should be "(i+1, k +1)"

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

    I could not understand why you did return min(money/7, children -1)? money/7 would occur when money/7< children and children-1would occur when money/7 > children. so how you put both condition in one line?

  • @Sam-gx9xl
    @Sam-gx9xl 3 місяці тому

    U explained the concept very well thank u for helping out

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

    whoa! I had never noticed LT has a button that analyzes the time complexity for us!

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

    Thanks for the explanation! I was unable to come up with a (sub O(N^2)) solution on my own, and reading LeetCode's explanation several times didn't help. This is good.

  • @dampdigits.69
    @dampdigits.69 3 місяці тому

    Thank you so much ❤

  • @MadhukarBhaktha-mw8yb
    @MadhukarBhaktha-mw8yb 3 місяці тому

    thank You

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

    Welcome back 🎉

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

    thank you, great explanation

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

    You're Impressive. thank you <3

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

    THANK YOU

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

    Thank you so much for your nice explanation, it really is easy.

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

    The cleanest and readable solution I've seen for this problem, thanks

  • @MukhtarAhmad-u2o
    @MukhtarAhmad-u2o 4 місяці тому

    Doing great job with sharing best and easy solution !!

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

    I think we can sort and get the last element in array which is largest and compare with first element of array which should be smalest then if abs both are equal then reutrn true , btw i am fan of your thinking startegy 🎉❤

  • @mdyusufansari8897
    @mdyusufansari8897 5 місяців тому

    this so diifcult,