Calculate the number of times a pattern appears in a string. | LinkedIn Interview Question | Practice Free | SkillVee