Code In Motion
Code In Motion
  • Видео 14
  • Просмотров 1 931
LeetCode was HARD until I learned these 14 patterns! | Coding Templates and Animations
📖 Written Blog www.blog.codeinmotion.io/p/leetcode-patterns 📖
👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel!
🔔 Hit the bell icon to stay updated on new videos
🎬 Welcome to another episode of Code In Motion! 🎬
Today, we’re looking at THE MOST FAMOUS 14 LeetCode patterns so that you can solve nearly ANY LeetCode question without memorizing solutions anymore! LeetCode was HARD until I learned these 14 patterns!
🧾How to approach each pattern step by step, with custom solutions, explanations, animations, and code templates!🧾
1. Sliding Window
2. Two Pointers
3. Slow and Fast Pointers
4. In Place Linked List Reversal
5. Binary Search
6. Top K Elements
7. Binary Tree ...
Просмотров: 181

Видео

LeetCode 141 Linked List Cycle | Blind 75 | Python | Slow and Fast Pointers
Просмотров 132 часа назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/linked-list-cycle/description/ Today, we’re solving LeetCode 141 Linked List Cycle | Blind 75 | Python | Slow and Fast Pointers - a common challenge you'll encounter in cod...
LeetCode 424 Longest Repeating Character Replacement | Blind 75 | Python | Sliding Window
Просмотров 564 часа назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/longest-repeating-character-replacement/description/ Today, we’re solving LeetCode 424 Longest Repeating Character Replacement | Blind 75 | Python | Sliding Window - a comm...
LeetCode 226 Invert Binary Tree | Blind 75 | Python
Просмотров 16814 часов назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/invert-binary-tree/description/ Today, we’re solving LeetCode 226 Invert Binary Tree | Blind 75 | Python - a common challenge you'll encounter in coding interviews on platf...
LeetCode 152 Maximum Product Subarray | Blind 75 | Python
Просмотров 20819 часов назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/maximum-product-subarray/description/ Today, we’re solving LeetCode 152 Maximum Product Subarray | Blind 75 | Python - a common challenge you'll encounter in coding intervi...
LeetCode 104 Maximum Depth of Binary Tree | Blind 75 | Python
Просмотров 168День назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/maximum-depth-of-binary-tree/description/ Today, we’re solving LeetCode 104 Maximum Depth of Binary Tree | Blind 75 | Python - a common challenge you'll encounter in coding...
LeetCode 100 Same Tree Animated Solution | Blind 75 | Python
Просмотров 94День назад
👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/same-tree/description/ Today, we’re solving LeetCode 100 Same Tree Animated Solution | Blind 75 | Python 🕒 Timestamps 🕒 0:00 - Problem Statement 0:57 - Animated Solution 4:53 - Coding Implementation #Python #Leetcode #Codi...
LeetCode 3 Longest Substring Without Repeating Characters | Blind 75 | Python | Sliding Window
Просмотров 215День назад
👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/longest-substring-without-repeating-characters/description/ Today, we’re solving LeetCode 3 Longest Substring Without Repeating Characters | Blind 75 | Python | Sliding Window 🕒 Timestamps 🕒 0:00 - Problem Statement 1:02 -...
LeetCode 1 Two Sum Animated Solution | Blind 75 | Hashmap | Python
Просмотров 167День назад
👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/two-sum/description/ Today, we’re solving LeetCode 1 Two Sum Animated Solution | Blind 75 | Hashmap | Python 🕒 Timestamps 🕒 0:00 - Problem Statement 0:38 - Brute Force Solution 2:47 - Optimal Solution 6:41 - Coding Impleme...
LeetCode 53 Maximum Subarray Kadane's Algorithm | Blind 75 | Prefix Sum
Просмотров 24614 дней назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/maximum-subarray/description/ Today, we’re solving LeetCode 53 Maximum Subarray Kadane's Algorithm | Blind 75 | Prefix Sum - a common challenge you'll encounter in coding i...
LeetCode 125 Valid Palindrome | Blind 75 | Python | Two Pointer Technique
Просмотров 5814 дней назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/valid-palindrome/description/ Today, we’re solving LeetCode #125 Valid Palindrome - a common challenge you'll encounter in coding interviews on platforms like LeetCode. In ...
LeetCode 217 Contains Duplicate | Python | Blind 75 | HashSet
Просмотров 42421 день назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/contains-duplicate/description/ Today, we’re solving LeetCode 217 Contains Duplicate - a common challenge you'll encounter in coding interviews on platforms like LeetCode. ...
LeetCode 11 Container With Most Water | Blind 75 | Two Pointer Technique | Python
Просмотров 8821 день назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/container-with-most-water/ Today, we’re solving Container With Most Water on the LeetCode Blind 75 list - a common challenge you'll encounter in coding interviews on platfo...
LeetCode 121 Best Time to Buy and Sell Stock | Blind 75 | Python
Просмотров 5228 дней назад
🎬 Welcome to another episode of Code In Motion! 🎬 👍 If you find this tutorial helpful, don’t forget to like and subscribe to my channel! 🔔 Hit the bell icon to stay updated on new videos 🔗 LeetCode URL: leetcode.com/problems/best-time-to-buy-and-sell-stock/ Today, we’re solving Best Time to Buy and Sell Stock on the LeetCode Blind 75 list - a common challenge you'll encounter in coding intervie...

Комментарии

  • @NH-hq7ly
    @NH-hq7ly 49 минут назад

    Amazing video. Thanks a lot

  • @jeehar1
    @jeehar1 3 часа назад

    Nice job man

  • @harsha1670
    @harsha1670 4 часа назад

    Thanks dude

  • @CodeInMotion-IO
    @CodeInMotion-IO 4 часа назад

    This video took a HUGE amount of effort, would appreciate a like and sub! If you want all coding templates see www.blog.codeinmotion.io/p/leetcode-patterns and if you want to see the entire Blind 75 list animated, subscribe!

  • @xXHelsingGamingXx
    @xXHelsingGamingXx 2 дня назад

    This video really made me visualize the problem than just simply looking to solve it!

  • @CodeInMotion-IO
    @CodeInMotion-IO 2 дня назад

    Subscribe to see the entire blind 75 animated!

  • @KP-we9ce
    @KP-we9ce 4 дня назад

    Great video!

  • @CodeInMotion-IO
    @CodeInMotion-IO 6 дней назад

    What problem do you want to see next?

  • @KP-we9ce
    @KP-we9ce 6 дней назад

    Great video.

    • @CodeInMotion-IO
      @CodeInMotion-IO 6 дней назад

      Stay tuned for more!

    • @KP-we9ce
      @KP-we9ce 6 дней назад

      @CodeInMotion-IO eagerly awaiting all the videos for the 150 series

  • @KP-we9ce
    @KP-we9ce 6 дней назад

    This was really good

  • @CodeInMotion-IO
    @CodeInMotion-IO 8 дней назад

    Subscribe for more leetcode goodies!

  • @CodeInMotion-IO
    @CodeInMotion-IO 8 дней назад

    Pro tip: for recursion, think of your base case and then trust your recurrence relation. Recursion is all about visualizing the problem, coding is usually a few lines of code!

  • @CodeInMotion-IO
    @CodeInMotion-IO 8 дней назад

    Subscribe for more animated leetcode videos!

  • @rachitsharma7921
    @rachitsharma7921 11 дней назад

    A better approach is to use bit manipulation to set the value of passed character and xor the current one to check if current char exists or not in Constant space linear time complexity

    • @CodeInMotion-IO
      @CodeInMotion-IO 10 дней назад

      The bit approach is more complex than using a hashmap and starts breaking down if the values aren't guaranteed to be ASCII. In fact, one can argue the hashmap solution is O(1) because the problem states only english letters, digits, symbols, and spaces are used. Therefore, the hashmap has a constant upper bound of keys, even in the worst case.

  • @moein7808
    @moein7808 12 дней назад

    nice explanation , thanks <3

  • @CodeInMotion-IO
    @CodeInMotion-IO 13 дней назад

    Hope this helps you understand the problem, happy hacking!

  • @CodeInMotion-IO
    @CodeInMotion-IO 13 дней назад

    A write up for the solution can be found here leetcode.com/problems/two-sum/solutions/6003699/codeinmotion-animated-video-simple-solution/

  • @CodeInMotion-IO
    @CodeInMotion-IO 13 дней назад

    Welcome to the channel, hope this helps you on your LeetCode journey!

  • @CodeInMotion-IO
    @CodeInMotion-IO 16 дней назад

    Hope this helps you out on your LeetCode journey! Subscribe for more :)

  • @punk5513
    @punk5513 16 дней назад

    Great man🔥🫡

  • @hiKevinKlein
    @hiKevinKlein 19 дней назад

    great vid! any reason to use a set vs. a list?

    • @CodeInMotion-IO
      @CodeInMotion-IO 19 дней назад

      A set has constant time search O(1) in majority of cases, a list has O(N) search time complexity. Using a list instead of set would result in O(N^2) time complexity instead of O(N)

  • @CodeInMotion-IO
    @CodeInMotion-IO 19 дней назад

    What LeetCode problem do you want to see next?

  • @Senseless_Pk
    @Senseless_Pk 19 дней назад

    I had one doubt about which programming language to prefer according to the company's trend.....I heard they are suddenly shifting into java from c++ for oops but (keeping the company's preferrable expect in mind), is coding in python equivalent to coding in java for the concepts like dynamic programming and so?

    • @CodeInMotion-IO
      @CodeInMotion-IO 19 дней назад

      I recommend using python for algorithmic style interview questions because it is much less verbose than C++ & Java and reads like pseudo-code, making it easy to code on a whiteboard

  • @CodeInMotion-IO
    @CodeInMotion-IO 23 дня назад

    Hope this video helps you out, happy hacking!

  • @CodeInMotion-IO
    @CodeInMotion-IO 29 дней назад

    Subscribe for more LeetCode animated solutions! Happy Hacking!