Leetcode 1567. Maximum Length of Subarray With Positive Product

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025

Комментарии • 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.

  • @arpitomar7875
    @arpitomar7875 2 года назад +1

    nice explanation.

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

    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.

  • @kashyapbavadiya
    @kashyapbavadiya 2 года назад

    Good Explaination and Approach... Thanx Fraz

  • @iamnoob7593
    @iamnoob7593 Год назад

    Thanks Fraz , Understood

  • @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);

  • @ratnasanjay
    @ratnasanjay 2 года назад +1

    Thankyou bhaiya for this session

  • @shantanukumar4081
    @shantanukumar4081 2 года назад +1

    Great Explanation !!!

  • @code_wid_moni
    @code_wid_moni 2 года назад

    crystal clear explanation!! Thanks brother.

  • @lkoh
    @lkoh 4 года назад

    Thank you so much for the 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.

  • @akashjaiswal6478
    @akashjaiswal6478 3 года назад

    Really helpful video, thanks brother

  • @AmarjeetKumar-to9ub
    @AmarjeetKumar-to9ub 2 года назад +1

    🔥++

  • @parthamishra09
    @parthamishra09 4 года назад

    Thanks. This is a good one.

  • @kbcoder3734
    @kbcoder3734 4 года назад

    Real nice explaination

  • @ishanpandey2949
    @ishanpandey2949 4 года назад

    Very beautiful explanation. An easy problem though.

  • @ashiquddinpranto4275
    @ashiquddinpranto4275 4 года назад

    Thanks a lot...

  • @abhishekbabbar9234
    @abhishekbabbar9234 4 года назад

    Clearly explained 🔥

  • @computerscience2589
    @computerscience2589 2 года назад

    i got a TLE on leetcode