number of ways to split a string leetcode | leetcode 1573 | string java

preview_player
Показать описание


#String #Split #Ways #Number LeetCode #Problem1573 #number_of_ways_to_split_a_string #Coding #Programming #Interview #Practice #DataStructure #Algorithm #Java #Preparation #NG #nickode #cct #cook_code_travel
Рекомендации по теме
Комментарии
Автор

Time Complexity - O(n)
Space Complexity - O(1), where n - length of string s.

NareshGupta
Автор

i have watched 5-6 of your videos and your content is really worth watching.. U explain it in a very good way

vamsimudaliar
Автор

Thank you very much for the video. I could solve a similar question that I was stuck for months with your explanation! I was thinking that this type of problem should be some sort of dynamic programming problem but it's much simpler than that. Thanks again! keep up with the good work!

marcossneijder
Автор

I need to recall some mathematics formula also broo.. inorder solve this kind of a string contains only zero till that condition I after that I can't able to catch your points what u r saying from the line you calculating way1 and way2 and return type the value of MOD is

stephenv
Автор

Sir can you please explain why ways2 will increase when ones is equal to 2/3rd.

abhicasm
Автор

Thank you, good video, clear explanation. I've subscribed to your channel

salmanasifs
Автор

Thank you for nice explanation. How did you get this idea?

poojaprasanthi
Автор

but this solution is not getting accepted, it is wrong for one test case
s =


output:1097833
expected:401097987

anushkathakur