Peloton Interactive Interview Question

2) Word break question from leet code