Okta interview question

Find the distance between 2 words in a string Design a stack