Welcome back.
Let's now get started with another interesting coding interview question which has the name word break.
The question reads given a string s and a dictionary of strings, word dict return true.
If s can be segmented into a space separated sequence of one or more dictionary words.
Note that the same word in the dictionary may be reused multiple times in the segmentation, and we
are given an example over here.
So let's say the word which is given to us is water bottle charger water okay.
So this is the string given to us.
And verdict has these words water bottle and charger.
Now if this is the input then the expected output is true because you have water.
So you have water okay.
Then you have bottle.
And bottle is there in verdict and you have charger and charger is there over here.
And water is being repeated.
And again that's allowed because that's what's mentioned over here.
So this is the question.
And with the example it's pretty straightforward to understand the question.
Now remember it's very important that you ask any clarifying questions after you're presented with a
coding interview question.
Now a possible question that you may want to ask for this question is, do I need to treat small case
and uppercase letters differently?
And let's say the interviewer replies that the string which is given to you will contain only lowercase
letters.
So if understood, the question which is pretty straightforward to understand when you take a look at
the example given, and we have asked clarifying questions in the next video, let's take a quick look
at the approaches that we are going to discuss for solving this question before we dive deeper into
the details.