Leetcode Weekly Contest 421 | Video Solutions - A to C | by Raghav Goel | TLE Eliminators

Поділитися
Вставка
  • Опубліковано 30 жов 2024

КОМЕНТАРІ • 16

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

    Please fill the Feedback form for PCD: forms.gle/sDJyhjRfHhrihh7L6

  • @ajayprabhu465
    @ajayprabhu465 4 дні тому +3

    Thanks brother, crystal clear

  • @ak_027
    @ak_027 4 дні тому +3

    Sir It would be good if you could record the stream in a better quality.
    Even after doing 720p It was blurry ,Don't know why.
    Rest explanation was good sir👍

    • @itzzRaghav
      @itzzRaghav 3 дні тому +2

      I had selected the highest possible resolution. But looks like it's still a little blurry.

  • @loyajagadeesh7902
    @loyajagadeesh7902 4 години тому

    I think there is no use of newCnt[j+1] = add(newCnt[j+1], cnt[j]); in for loop
    already we handling it in outside
    is this crct ??

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

    ❤❤

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

    can 2nd be solved in O(log N) time?

  • @tharabhaigamer82
    @tharabhaigamer82 3 дні тому

    you look like kalpit veerval

  • @jashanpreet.753
    @jashanpreet.753 4 дні тому

    Why is this giving TLE for the 3rd question.
    class Solution {
    void precomputeGCDs(vector &gcd) {
    for (int i = 0; i

    • @Manojkumar-pj9wf
      @Manojkumar-pj9wf 4 дні тому

      your time complexity precompute => 4*10^4*log(200) => 2 * 10^7
      dp logic => 8* 10^6
      overall => approx(10^8)
      Instead of doing precompute every time, do it once and use it for every testcase.
      like this
      check whether gcd[1][1] is 0 or not, if it is 0 then do precompute else do nothing
      hope you get clarification :)

    • @Manojkumar-pj9wf
      @Manojkumar-pj9wf 4 дні тому

      and one more, instead of making gcd vector local variable, make it class variable

  • @TusharKhandelwal-m6b
    @TusharKhandelwal-m6b 3 дні тому

    code khud se likho bro