Leetcode Biweekly Contest 95 || Screencast + Commentary || Solving All Problems

Поділитися
Вставка
  • Опубліковано 15 січ 2025

КОМЕНТАРІ • 20

  • @sauravbharti2709
    @sauravbharti2709 2 роки тому +1

    Hahahaha, I had also done the same mistake on problem A, In every 3 to 4 contests Overflow makes it's presence felt in leetcode 😂😂

  • @shubhamroy7510
    @shubhamroy7510 2 роки тому +6

    Without thinking the logic of xor beauty prob, I took xor of all value and that was correct.

  • @rishabh507
    @rishabh507 2 роки тому

    At 29:30 I was stuck on the same problem and tried using segment tree with lazy propagation to update the sun for the range and it TLEd

  • @aryangurung1557
    @aryangurung1557 2 роки тому

    can you please make a dedicated video on the last problem I cannot comprehend it

  • @noobnessmee
    @noobnessmee 2 роки тому +1

    A to C felt too easy, but D was tough. Thanks for the consistency Sir🙏🙏

  • @ayushnautiyal7965
    @ayushnautiyal7965 2 роки тому +1

    Not able to solve B :(

  • @David-mk8kh
    @David-mk8kh 2 роки тому

    Why you initialized 'r' to 1e18 in line no 24?

    • @prakash_77
      @prakash_77 2 роки тому

      It is more than sufficient. The max value for r can be 1e14 though. And binary search is fast enough to not make that much of a difference in running time.

  • @rashidaziz2215
    @rashidaziz2215 2 роки тому

    My C solution:
    class Solution {
    public:
    int xorBeauty(vector& nums) {
    int xoor = 0;
    for(auto it: nums) xoor ^= it;
    return xoor;
    }
    };

    • @rohit2571
      @rohit2571 2 роки тому

      what's the approach brother??

    • @dibyabratapanja9329
      @dibyabratapanja9329 2 роки тому +1

      @@rohit2571 for every triplet (i,j,k) there is (j,i,k) XORing both will result to 0 so all triplets get cancelled out except those like (i,i,i) (a[i]|a[i])&a[i]=a[i] itself
      So XORing every element will give the answer.

  • @as.if_0077
    @as.if_0077 2 роки тому

    can you share that icpc prep sheet that is bookmarked please?

  • @s_3095
    @s_3095 2 роки тому +1

    hey , how can i become expert on codeforces in a time like 3-4 months. or is this impossible or far away from reality

  • @Live-hh6li
    @Live-hh6li 2 роки тому +2

    You got a under 500 rank I suppose
    It was not updated when you saw rank
    I got around 560 and my finish time was 7 mins more than you
    That's why

  • @BuddyCode
    @BuddyCode 2 роки тому

    nice

  • @unibrow9384
    @unibrow9384 2 роки тому

    What happened to your hairline??

  • @108_adityakumar6
    @108_adityakumar6 2 роки тому +1

    Getting this integer overflow error is quite irritating 🥲🥲