filmov
tv
Word Break 2 | Leetcode #140

Показать описание
This video explains the word break 2 problem from leetcode #140. It is a very important interview problem on string. There are multiple techniques to solve this using Dynamic Programming as well as TRIE, MAP, SET etc. I had already explained the Dynamic Programming approach in the previous video on Word Break 1 problem (LINK is given below). In this video, I have explained an alternative Recursion + TRIE approach for solving the problem efficiently. It is a 2 step process. First store word dictionary in the TRIE and then use Recursion to do all valid partition for words. When we end the string by making all valid partitions then simply store the built sentence in our answer array of string.
CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
======================================PLEASE DONATE=============================
==============================================================================
=======================================================================
USEFUL LINKS:
RELATED LINKS:
CODE LINK is present below as usual. If you find any difficulty or have any query then do COMMENT below. PLEASE help our channel by SUBSCRIBING and LIKE our video if you found it helpful...CYA :)
======================================PLEASE DONATE=============================
==============================================================================
=======================================================================
USEFUL LINKS:
RELATED LINKS:
Комментарии