Shortest Subarray with Sum at Least K | O(N) solution | Leetcode - 862

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • Shortest Subarray with Sum at Least K explained from brute force to optimized solution.
    00:00 Introduction
    01:25 Optimizing to O(NlogN)
    02:50 Two pointer Approach Revision
    04:37 Continuing with O(NlogN)
    15:33 Coding O(NlogN) solution
    23:55 Optimizing further to O(N)
    29:58 Coding O(N) solution
    34:19 Learnings
    Join this channel to get access to perks:
    / @algorithmsmadeeasy
    Get Discount on GeeksforGeeks courses (practice.geeksforgeeks.org/co...) by using coupon code: ALGOMADEASY
    To support us you can donate
    UPI: algorithmsmadeeasy@icici
    Check out our other popular playlists:
    Questions you might like:
    ✅✅✅[ Tree Data Structure] : • Tree Data Structure
    ✅✅✅[ Graphs Data Structure] : • Graph Data Structure
    ✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
    ✅✅✅[ January Leetcoding Challenge] : • January Leetcoding Cha...
    ✅✅✅[ February Leetcoding Challenge] : • February Leetcoding Ch...
    ✅✅✅[ March Leetcoding Challenge] : • March Leetcoding Chall...
    ✅✅✅[ December Leetcoding Challenge] : • December Leetcoding Ch...
    ✅✅✅[ November Leetcoding Challenge] : • November Leetcoding Ch...
    ✅✅✅[ August Leetcoding Challenge] : • August LeetCoding Chal...
    ✅✅✅[ July Leetcoding challenges] : • July LeetCoding Challe...
    ✅✅✅[ June Leetcoding challenges] : czcams.com/users/playlist?list...
    ✅✅✅[ May Leetcoding challenges] : • May LeetCoding Challen...
    ✅✅✅ Cracking the Coding Interview - Unique String: • Cracking the Coding In...
    Problem Link: leetcode.com/problems/shortes...
    Code: github.com/Algorithms-Made-Ea...
    If you find any difficulty or have any query, then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful.
    #coding #leetcode #programminglife #programmingisfun #programmer #tech #software #codinglife #leetcode

Komentáře • 8

  • @harshupadhayay7087
    @harshupadhayay7087 Před rokem +2

    Liked, subbed and sheared!!
    Was stuck on this problem for a long time, no other solution/editorial managed to convey the logic as profoundly as you did.
    Kudos man, thankyou for the great free content.

  • @dojoPojo
    @dojoPojo Před 11 měsíci +1

    Awesommmmeeee 🤯💫 This was the best explaination !

  • @AmritAgarwal07
    @AmritAgarwal07 Před rokem +1

    This video after a long time

  • @dojoPojo
    @dojoPojo Před 11 měsíci

    I have a doubt like in first approach we have for loop o(n) than inside it while loop and map lower bound o(nlogn)
    so shouldn't it time complexity be o(n* nlogn)

  • @HarshKumar-ip5nr
    @HarshKumar-ip5nr Před 10 měsíci

    Good work. But what's the cpp equivalent of key map?