DSA Series : Word Break Problem | Recursion Problem Solving Strategy

preview_player
Показать описание
Hello Everyone, Welcome to Tech Learnings!

Today, we continue with learning data structures and try to build up our concepts by trying to understand the "Word break Problem".

Problem Statement:

Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words.

Consider the following dictionary
{ i, like, sam, sung, samsung, mobile, ice,
cream, icecream, man, go, mango}

Input: ilike
Output: Yes
The string can be segmented as "i like".

Input: ilikesamsung
Output: Yes
The string can be segmented as "i like samsung"
or "i like sam sung".

You can stay updated with website and other social platforms as well:

If you liked the video or learned something new, please do give a thumbs up and don't forget to share, subscribe or comment!

Stay subscribed, let's keep learning together, see you soon :)
Рекомендации по теме
Комментарии
Автор

Very nicely explained..keep on adding problem solving questions 👍👍

RaviKant-jwbb
Автор

What if there are works like respectful where the algorithm takes respect but ful is not in the dictionary

eshanchawla
Автор

nice explanation but ur logic is flawed, take dictionary as ["i", "li", "like", "java"] and you will come to know

kumarsatyam
welcome to shbcf.ru