Leetcode 1567. Maximum Length of Subarray With Positive Product

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

КОМЕНТАРІ • 21

  • @elliotdunlo3735
    @elliotdunlo3735 4 роки тому +3

    Thank you for the explanation. I couldn't do it at first but after watching the idea behind your solution, I could write the code myself.

  • @PushpendraSingh-bx2iz
    @PushpendraSingh-bx2iz 4 роки тому +2

    I think the condition at line number 27 will always be true because control came to the else loop since it had odd number of negative numbers and in that case sn!=-1 will be surely true
    Hence we can write line number 27-28 as :- ans = max(ans, max(e-sn-1, en-s);

  • @pranavdharkar
    @pranavdharkar Місяць тому

    i tried the same thing at the code while(nums[e] != 0 && e < n) leetcode gives heap buffer overflow(index out of bound ) but how it is working on this ide.

  • @arpitomar7875
    @arpitomar7875 Рік тому +1

    nice explanation.

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

    very helpful and clean code, i implemented the same method as yours which was given in the hint section of the leetcode problem but wrote such a messy code and it didn't worked.

  • @kashyapbavadiya2664
    @kashyapbavadiya2664 Рік тому

    Good Explaination and Approach... Thanx Fraz

  • @iamnoob7593
    @iamnoob7593 Рік тому

    Thanks Fraz , Understood

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

    Great Explanation !!!

  • @AmarjeetKumar-to9ub
    @AmarjeetKumar-to9ub Рік тому +1

    🔥++

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

    crystal clear explanation!! Thanks brother.

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

    Thankyou bhaiya for this session

  • @akashjaiswal6478
    @akashjaiswal6478 3 роки тому

    Really helpful video, thanks brother

  • @ishanpandey2949
    @ishanpandey2949 4 роки тому

    Very beautiful explanation. An easy problem though.

  • @lkoh
    @lkoh 4 роки тому

    Thank you so much for the explanation.

  • @kbcoder3734
    @kbcoder3734 4 роки тому

    Real nice explaination

  • @ashiquddinpranto4275
    @ashiquddinpranto4275 4 роки тому

    Thanks a lot...

  • @parthamishra09
    @parthamishra09 4 роки тому

    Thanks. This is a good one.

  • @abhishekbabbar9234
    @abhishekbabbar9234 4 роки тому

    Clearly explained 🔥

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

    i got a TLE on leetcode