Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Stepwise, not complicated solution in Clear category for Words Order by mAzrunnr
def words_order(text: str, words: list) -> bool:
txt = text.split()
j = []
for i in words:
if words.count(i) > 1 or not(i in txt):
l = False
break
else:
loc = txt.index(i)
j.append(loc)
k = j.copy()
k.sort()
l = (j == k)
return l
June 12, 2021