Number of Ways to Split Array | Leetcode 2270

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

Комментарии • 23

  • @thenightwolf224
    @thenightwolf224 2 дня назад +3

    You are amazing man keep it up ❤🔥

  • @sailendrachettri8521
    @sailendrachettri8521 День назад +2

    Was able to solved using bruteforce approach but got TLE :(
    Though got intuition of solving using prefixSum but could'nt
    Thank you for your explanation sir :)

  • @priyamani4349
    @priyamani4349 День назад +1

    Thank you so much for this video

  • @liveurlife3166
    @liveurlife3166 День назад +1

    Completed Sir.

  • @jayantpradhan-sz9oj
    @jayantpradhan-sz9oj 2 дня назад +5

    please DRY run in java code also , its humble request

    • @keerthivasan138
      @keerthivasan138 2 дня назад

      In java i got error due to int conversion it fgot solved using long to sum and prefix sum
      but involves alot of trials and error!

    • @jayantpradhan-sz9oj
      @jayantpradhan-sz9oj 2 дня назад

      @@keerthivasan138 copy your code then paste to chatgpt then him where is error and explain how .

    • @anirudhsingla8344
      @anirudhsingla8344 2 дня назад +1

      @@keerthivasan138 yes same for me. getting one last test case failed due to this. but after using long its fixed.

    • @jayantpradhan-sz9oj
      @jayantpradhan-sz9oj 2 дня назад

      @@keerthivasan138 can i get your code ? or share me you leetcode profile link

  • @DineshKumar.R-uo1rt
    @DineshKumar.R-uo1rt 2 дня назад +1

    Bro can you explain the problem 2080. Range Frequency Queries using segment tree in leetcode. I tried but can't solve the problem using segment tree.

    • @techdose4u
      @techdose4u  День назад +1

      Recently solved a segment tree RMQ + Binary search.
      Frequency count is similar to RMQ.
      Please use that video.
      Goto the channel page and scroll past 15 videos you will see on thumbnail :)

  • @ashwinchakote3954
    @ashwinchakote3954 День назад +1

    Sir One small Doubt wouldn't Prefix array take space? So,Space Complexity is O(N)

    • @techdose4u
      @techdose4u  День назад

      I dint take prefix array.
      Just a sum variable :)

  • @snehadey883
    @snehadey883 2 дня назад +1

    I wrote the same code but it beats only 64%, why?

    • @liveurlife3166
      @liveurlife3166 День назад +1

      dont focus on the beats on leetcode as it differs based upon the engine.
      You can verify this by submitting the same code different times but you get different beats

  • @kthamim7552
    @kthamim7552 День назад

    how to find which one fit ,whether int or long ?