LetsCode
LetsCode
  • Видео 1 037
  • Просмотров 67 050

Видео

Leetcode 2305. Fair Distribution of Cookies (backtrack)
Просмотров 321 час назад
2305. Fair Distribution of Cookies
Leetcode 1269. Number of Ways to Stay in the Same Place After Some Steps (linear dp)
Просмотров 172 часа назад
1269. Number of Ways to Stay in the Same Place After Some Steps
Leetcode 2034. Stock Price Fluctuation (sorted list)
Просмотров 102 часа назад
2034. Stock Price Fluctuation
Leetcode 2349. Design a Number Container System (sorted list or heap)
Просмотров 144 часа назад
2349. Design a Number Container System
Leetcode 2402. Meeting Rooms III (2 heaps)
Просмотров 297 часов назад
2402. Meeting Rooms III
Leetcode 1882. Process Tasks Using Servers (2 heaps)
Просмотров 67 часов назад
1882. Process Tasks Using Servers
Leetcode 1792. Maximum Average Pass Ratio (heap)
Просмотров 207 часов назад
1792. Maximum Average Pass Ratio
Leetcode 1801. Number of Orders in the Backlog (2 heaps)
Просмотров 59 часов назад
1801. Number of Orders in the Backlog
Leetcode 1942. The Number of the Smallest Unoccupied Chair (2 heaps)
Просмотров 79 часов назад
1942. The Number of the Smallest Unoccupied Chair
Leetcode 3296. Minimum Number of Seconds to Make Mountain Height Zero (heap)
Просмотров 612 часов назад
3296. Minimum Number of Seconds to Make Mountain Height Zero
Leetcode 1845. Seat Reservation Manager (min heap)
Просмотров 712 часов назад
1845. Seat Reservation Manager
Leetcode 3275. K-th Nearest Obstacle Queries (max heap)
Просмотров 512 часов назад
3275. K-th Nearest Obstacle Queries
Leetcode 703. Kth Largest Element in a Stream (heap)
Просмотров 514 часов назад
703. Kth Largest Element in a Stream
Leetcode 3066. Minimum Operations to Exceed Threshold Value II (min heap)
Просмотров 514 часов назад
Leetcode 3066. Minimum Operations to Exceed Threshold Value II (min heap)
Leetcode 2530. Maximal Score After Applying K Operations (max heap)
Просмотров 414 часов назад
Leetcode 2530. Maximal Score After Applying K Operations (max heap)
Leetcode 2336. Smallest Number in Infinite Set (min heap to sorted list to sorted set)
Просмотров 414 часов назад
Leetcode 2336. Smallest Number in Infinite Set (min heap to sorted list to sorted set)
Leetcode 2558. Take Gifts From the Richest Pile (max heap)
Просмотров 614 часов назад
Leetcode 2558. Take Gifts From the Richest Pile (max heap)
Leetcode 3264. Final Array State After K Multiplication Operations I (min heap)
Просмотров 314 часов назад
Leetcode 3264. Final Array State After K Multiplication Operations I (min heap)
Leetcode 1046. Last Stone Weight (max heap)
Просмотров 814 часов назад
Leetcode 1046. Last Stone Weight (max heap)
Leetcode 484. Find Permutation (stack)
Просмотров 1716 часов назад
Leetcode 484. Find Permutation (stack)
Leetcode 895. Maximum Frequency Stack (sorted list and dict)
Просмотров 619 часов назад
Leetcode 895. Maximum Frequency Stack (sorted list and dict)
Leetcode 1762. Buildings With an Ocean View (monotonic stack)
Просмотров 319 часов назад
Leetcode 1762. Buildings With an Ocean View (monotonic stack)
Leetcode 716. Max Stack (Sorted List)
Просмотров 919 часов назад
Leetcode 716. Max Stack (Sorted List)
Leetcode 1063. Number of Valid Subarrays (monotonic stack)
Просмотров 619 часов назад
Leetcode 1063. Number of Valid Subarrays (monotonic stack)
Leetcode 902. Numbers At Most N Given Digit Set (digit dp)
Просмотров 18День назад
Leetcode 902. Numbers At Most N Given Digit Set (digit dp)
Leetcode 2376. Count Special Integers (digit dp with template)
Просмотров 7День назад
Leetcode 2376. Count Special Integers (digit dp with template)
Leetcode 796. Rotate String (kmp)
Просмотров 2День назад
Leetcode 796. Rotate String (kmp)
Leetcode 28. Find the Index of the First Occurrence in a String (kmp with example)
Просмотров 11День назад
Leetcode 28. Find the Index of the First Occurrence in a String (kmp with example)
Leetcode 982. Triples with Bitwise AND Equal To Zero (2 sum)
Просмотров 24День назад
Leetcode 982. Triples with Bitwise AND Equal To Zero (2 sum)

Комментарии

  • @MasterandMargarita-h2w
    @MasterandMargarita-h2w 18 часов назад

    what extension do you use for drawing?

    • @letsleetcode2024
      @letsleetcode2024 10 часов назад

      chrome extension Web Paint Tool - draw online

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

    a mistake at 3:35, should be 9, 9, and 1 for first example

  • @sonicspider49
    @sonicspider49 15 дней назад

    great video!

  • @GusArlen
    @GusArlen 18 дней назад

    Great analysis, thank you! A bit off-topic, but I wanted to ask: My OKX wallet holds some USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How can I transfer them to Binance?

  • @punk5513
    @punk5513 21 день назад

    🔥🔥🔥🫡

  • @letscode1000
    @letscode1000 24 дня назад

    the coding: class Solution: def findInMountainArray(self, target: int, mountainArr: 'MountainArray') -> int: def findPeak(): l, r = 1, mountainArr.length() - 2 res = 0 while l <= r: m = (l + r) // 2 if mountainArr.get(m) > mountainArr.get(m + 1): res = m r = m - 1 else: l = m + 1 return res pIndex = findPeak() def binary_search(l, r): while l <= r: m = (l + r) // 2 if mountainArr.get(m) > target: r = m - 1 elif mountainArr.get(m) < target: l = m + 1 else: return m return -1 def binary_search2(l, r): while l <= r: m = (l + r) // 2 if mountainArr.get(m) > target: l = m + 1 elif mountainArr.get(m) < target: r = m - 1 else: return m return -1 idx = -1 idx = binary_search(0, pIndex) if idx != -1: return idx return binary_search2(pIndex, mountainArr.length() - 1)

  • @HariKrishnan-ff4hf
    @HariKrishnan-ff4hf 25 дней назад

    Exactly this was asked to me in microsoft . May i know How you got to know ?

  • @letscode1000
    @letscode1000 27 дней назад

    some tech issues, here is the whole coding: class Solution: def minimumLevels(self, possible: List[int]) -> int: nums = [] for p in possible: if p == 1: nums.append(p) else: nums.append(-1) s = sum(nums) res = 0 for i, n in enumerate(nums): res += n if res > s - res and i < len(nums) - 1: return i + 1 return -1

  • @panyudong4111
    @panyudong4111 Месяц назад

    哥好牛

  • @panyudong4111
    @panyudong4111 Месяц назад

    沖!

  • @letscode1000
    @letscode1000 2 месяца назад

    for anyone who check the video may need the last code, or you can code by yourself. class Solution: def findLadders(self, beginWord: str, endWord: str, wordList: List[str]) -> List[List[str]]: wordSet = set(wordList) ans = [] if endWord not in wordSet: return ans l, s1, s2 = len(beginWord), {beginWord}, {endWord} flag, d = False, defaultdict(list) while s1: s = set() for w in s1: words = [w[:i] + c + w[i + 1:] for c in ascii_lowercase for i in range(l)] for word in words: if word in s2: flag = True if word in wordSet: s.add(word) d[word].append(w) for word in s: wordSet.remove(word) s1 = s if flag: break def backtrack(cur, res): if cur == beginWord: ans.append(res[::-1]) return for word in d[cur]: backtrack(word, res + [word]) return ans return backtrack(endWord, [endWord])

  • @vedanthbaliga7686
    @vedanthbaliga7686 2 месяца назад

    Great explanation thanks a lot!

  • @bunnyyama2740
    @bunnyyama2740 2 месяца назад

    Great explaination!!

  • @sallaklamhayyen9876
    @sallaklamhayyen9876 2 месяца назад

    thank you so much

  • @dsundararajan500
    @dsundararajan500 3 месяца назад

    clear explanation on the core idea !!

  • @sallaklamhayyen9876
    @sallaklamhayyen9876 3 месяца назад

    very good explanation = thank you so much

  • @matthewzarate8851
    @matthewzarate8851 3 месяца назад

    This is the best explanation and solution to the problem I could find on RUclips! Thanks!

  • @xxxqqq
    @xxxqqq 3 месяца назад

    Great video! The most detailed explaination I saw! Please keep posting! It will be even better if you could provide your code, thanks!

  • @saranshthukral4021
    @saranshthukral4021 3 месяца назад

    keep posting BoSS

    • @letscode1000
      @letscode1000 3 месяца назад

      @@saranshthukral4021 will post more if it is useful😀

  • @letscode1000
    @letscode1000 3 месяца назад

    instand of going from 2 directions, do it as cherry pickup 1, start from 1 direction

  • @akilkarthikeyan
    @akilkarthikeyan 3 месяца назад

    nice!

  • @saranshthukral4021
    @saranshthukral4021 3 месяца назад

    very well sir. Thanks

  • @UtkarshWasHereBeforeYou
    @UtkarshWasHereBeforeYou 3 месяца назад

    Thanks

  • @jaishreeram8428
    @jaishreeram8428 3 месяца назад

    👍👍

  • @guedjs
    @guedjs 3 месяца назад

    it may have been easier to understand by keeping the/one example

    • @letscode1000
      @letscode1000 3 месяца назад

      yes, it makes sense to keep consistant with examples, I'll keep in mind.

  • @shashwatbhatnagar659
    @shashwatbhatnagar659 3 месяца назад

    Great explanation. Thank you so much. Keep this great work up !! 🥰

  • @basic-2-advance
    @basic-2-advance 3 месяца назад

    Keep up the good work!

  • @sallaklamhayyen9876
    @sallaklamhayyen9876 3 месяца назад

    good explanation = thank you so much + please continue❤❤

    • @letscode1000
      @letscode1000 3 месяца назад

      thanks, every time when I start to give up and received the message that cheer me up to continue.❤

  • @Dagemawi-j7i
    @Dagemawi-j7i 3 месяца назад

    Thanks a lot this was helpful👍👍

  • @cidu1706
    @cidu1706 3 месяца назад

    给我讲懂了,太强了

  • @letscode1000
    @letscode1000 4 месяца назад

    What is your intution when you come across this problem?

  • @problemsolvers7085
    @problemsolvers7085 4 месяца назад

    Hi, I love your content! 🎥 I specialize in video editing and thumbnail design, and I’d love to help enhance your videos and boost your channel's visuals. If you’re interested, let’s chat about how I can contribute to your amazing work!

    • @letscode1000
      @letscode1000 4 месяца назад

      thanks a lot, I still need more time to focus on how to improve my English skills and algorithms skills. Boosting the channel is not my target currently.

    • @problemsolvers7085
      @problemsolvers7085 4 месяца назад

      @@letscode1000 Thank you for your time and consideration. I completely understand and appreciate your response. If you ever have a need for video editing or thumbnail design services in the future, please don’t hesitate to reach out. Wishing you continued success with your channel! Best regards,

  • @karvinus
    @karvinus 4 месяца назад

    very easy and intuitive solution

  • @ronaldjohnson_ita
    @ronaldjohnson_ita 4 месяца назад

    Thanks!

  • @Anonymous____________A721
    @Anonymous____________A721 4 месяца назад

    Nice reading comprehension

  • @aqhr050
    @aqhr050 4 месяца назад

    Thanks for the solution, this would be very hard without sortedlist.

  • @rajushankpoul9928
    @rajushankpoul9928 4 месяца назад

    Hey buddy I have no idea about this but Im still watching..!

    • @letscode1000
      @letscode1000 4 месяца назад

      I know it seems hard when you first come across linked list, but it will be much easier when you’re getting familiar with basic data structure like tree and graph, linked list is basic disconnect and connected 2 nodes, from beginning you can practice with making a drawing, after that,everything is in your mind, you know how to do it.

    • @rajushankpoul9928
      @rajushankpoul9928 4 месяца назад

      @@letscode1000 Everything in my mind, So how can I access my brain info..!

    • @rajushankpoul9928
      @rajushankpoul9928 4 месяца назад

      If everything in my mind, so how can I access my brain info.. !

    • @letscode1000
      @letscode1000 4 месяца назад

      @@rajushankpoul9928 this is not the kind of hard problems need to use brain, only some harder problems need to use brain, use your mind is like memory and experience.

    • @rajushankpoul9928
      @rajushankpoul9928 4 месяца назад

      @@letscode1000 hey buddy how can I send video to better understanding for me..!

  • @HarisVFX
    @HarisVFX 4 месяца назад

    This was helpful thanks!

  • @unanimous8510
    @unanimous8510 5 месяцев назад

    why do you draw that grid's border as a semi-circle? that should be a straight line god damn it!

  • @letscode1000
    @letscode1000 5 месяцев назад

    this is a 4 color problem

  • @madhuvamsimachavarapu5267
    @madhuvamsimachavarapu5267 5 месяцев назад

    class Solution: def findTheDistanceValue(self, arr1: List[int], arr2: List[int], d: int) -> int: myset = set(arr2) count = 0 def process(i,d): ans = [i] while d>=0: ans.extend([i-d,i+d]) d-=1 return ans for i in arr1: acceptable_values=process(i,d) ll=list(filter(lambda x:x in myset,acceptable_values)) if len(ll)>=1: continue else: count+=1 return count

  • @МаркЛевичкин
    @МаркЛевичкин 5 месяцев назад

    Elegant

  • @letscode1000
    @letscode1000 5 месяцев назад

    we can use return list(A.intersection(P)) to make it mush easier to write

  • @ceciljoel9577
    @ceciljoel9577 5 месяцев назад

    If someone is good at codeforces problems can they easily become good at leetcode problems

  • @PigCurious
    @PigCurious 6 месяцев назад

    Thanks for the video, helped me out. keep up the good work! 🌸

  • @supplymeweed
    @supplymeweed 6 месяцев назад

    I have a doubt why we cannot make prefix sum of size same as nums size, why we initialize prefix sum 0 at 0 index

    • @letscode1000
      @letscode1000 6 месяцев назад

      It's also ok without zero padding, we can prepare a padding 0 for easy handle edge cases, like prefix sum from index 2 - index 0, if no zero padding, you need to have the edge cases check and add more lines of code. if it has no index 0 padding, you need the if check to check if it is zero.

  • @supplymeweed
    @supplymeweed 6 месяцев назад

    Thank you bro, this solution really helped me...

  • @yashwanthnadella537
    @yashwanthnadella537 6 месяцев назад

    Nice explanation!

  • @nikenuke
    @nikenuke 6 месяцев назад

    thank you!