Peloton Interactive interview question

2) Word break question from leet code