Leetcode Weekly Contest 404 | Video Solutions - A to D | by Abhinav Kumar | TLE Eliminators

Поділитися
Вставка
  • Опубліковано 16 лип 2024
  • Here are the video solutions for problems A, B, C, D of Leetcode Weekly Contest 404. We hope this will be useful for you in up-solving this contest.
    📢Check out handpicked problems by Priyansh himself, on our CP-31 sheet: www.tle-eliminators.com/cp-sheet
    Solution Codes:
    Problem 1: leetcode.com/problems/maximum...
    Problem 2: leetcode.com/problems/find-th...
    Problem 3: leetcode.com/problems/find-th...
    Problem 4: leetcode.com/problems/find-mi...
    Problem 4(using Re-rooting) : leetcode.com/problems/find-mi...
    Be sure to check out TLE Eliminators.
    Website: www.tle-eliminators.com/
    Instagram: / tle_eliminators
    Linkedin: / tle-eliminators
    Twitter: / tle_eliminators
    TLE Community Discord Server: / discord
    Timestamps:-
    0:00 Problem A
    13:30 Problem B
    33:39 Problem C
    1:09:14 Problem D

КОМЕНТАРІ • 37

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

    Please fill the feedback form: forms.gle/eEietfsYMzQGMeX47

  • @user-hy2qe4ov7q
    @user-hy2qe4ov7q 16 днів тому +6

    wasted the contest only for problem 1. while reading it felt easy when solving it got me.

    • @user-ym1nv1pw8i
      @user-ym1nv1pw8i 16 днів тому +2

      Did the same mistake : (
      In reality first problem should be marked medium while second problem should be marked easy!

  • @omkara477
    @omkara477 12 днів тому +3

    Question 3 very poorly explained. You just went and read the code

  • @SankalpTyagi
    @SankalpTyagi 17 днів тому +9

    Can someone please provide a Recursion + Memoization Code for the third 3rd problem. It would be really helpful!!

    • @omkara477
      @omkara477 12 днів тому +2

      u are from strivers A-Z DSA aren't u?

    • @SankalpTyagi
      @SankalpTyagi 12 днів тому +1

      @@omkara477 No bro, just recently started learning Dynamic Programming. Thats why I try to build solution using recursion and memoization first. So please help if you could

  • @user-tj8xi4xi8k
    @user-tj8xi4xi8k 17 днів тому +2

    Very niceely explained sir thanks

  • @rahulkumarbehera8269
    @rahulkumarbehera8269 17 днів тому +4

    Sir ji plz use a good mic.

  • @devisriprasad119
    @devisriprasad119 17 днів тому +3

    47:38
    from here it was hard to understand

  • @roshangeorge97
    @roshangeorge97 16 днів тому +1

    explanation of 2nd was to the point!

  • @ajayprabhu465
    @ajayprabhu465 13 днів тому

    can i know how 2nd qn code handles both the cases of alternating subsequences ,ie starting with even and strting with odd?

  • @yogenderkumar3319
    @yogenderkumar3319 16 днів тому +1

    Question 3 is really depth of numbers😢f

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

    When the new batch of TLE eliminators will start??

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

    nice explanation

  • @user-ti7jb6xp4n
    @user-ti7jb6xp4n 16 днів тому

    how to think dp states but

  • @sagarprajapati6026
    @sagarprajapati6026 10 днів тому

    Right way yo learning DP can anyone tell?

  • @A_Myth963
    @A_Myth963 17 днів тому +1

    I was able to write the recursive code for 2nd... But wasn't able to memoise it

    • @adarshamit3503
      @adarshamit3503 16 днів тому +1

      can u send me
      the recursive code

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

      @@adarshamit3503 class Solution {
      public:
      int calc(vector&nums,int i,int comp,int k){
      if(i == 0) return 0;
      //cases
      if(k == 2){
      int take1 = 1 + calc(nums,i-1,nums[i-1],0);
      int take2 = 1 + calc(nums,i-1,nums[i-1],1);
      int nott = calc(nums,i-1,0,2);
      return max(take1,max(take2,nott));
      }
      else if((nums[i-1]+comp) % 2 == k){
      return 1 + calc(nums,i-1,nums[i-1],k);
      }else
      return calc(nums,i-1,comp,k);
      }
      int maximumLength(vector& nums) {
      int n = nums.size();
      return calc(nums,n,0,2);
      }
      };

  • @Rajan-xv9cz
    @Rajan-xv9cz 16 днів тому +1

    pls improve explination

  • @mohitkukreja4531
    @mohitkukreja4531 16 днів тому +2

    explanation was very bad...i think you are explaining to someone who had a same thinking like you..but you are explaining to someone who dont understand the logic thats why they came here...

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

    Sir , very nicely and throughly explained . Thanks a lot ❤

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

    3rd question is very poorly explained :(

  • @anonymous10906
    @anonymous10906 16 днів тому +1

    nice explanation for c

  • @Ayush37262
    @Ayush37262 16 днів тому +4

    Very bad explanation 👎

  • @shibainu7500
    @shibainu7500 17 днів тому +3

    Please use a real mic instead of a potato

    • @Munnu-hs6rk
      @Munnu-hs6rk 17 днів тому +6

      bro its fine

    • @NotFound-c2b
      @NotFound-c2b 17 днів тому +12

      Maybe u can try using a real headphone instead of a tomato. 🍅

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

      @@NotFound-c2b yo 💀🤣

    • @user-ym1nv1pw8i
      @user-ym1nv1pw8i 16 днів тому

      Great Explanation but bad mic

  • @akashpandit7593
    @akashpandit7593 16 днів тому +4

    Bro, can't you speak Hindi? Obviously our national language is Hindi.
    You will get more views and more subscribers and more recognition.
    Think about it..

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

      bhai kisne bola national lang hindi hai...? Gk bhi nhi jante tm ?

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

      @@vishnuamit7290 National nahi but official language toh hai, bhavana samjho bhai...

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

      @@akashpandit7593 haa..voh toh hai !