Number of Ways to Split Array | Leetcode 2270

preview_player
Показать описание
This video explains Number of Ways to Split Array problem using the most optimal prefix sum technique.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037
---------------------------------------------------------------------------------------------------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

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 :)

sailendrachettri
Автор

please DRY run in java code also, its humble request

jayantpradhan-szoj
Автор

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.

DineshKumar.R-uort
Автор

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

ashwinchakote
Автор

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

snehadey
Автор

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

kthamim