Lets see how to find out the number of occurrence of a sub string in a string. Example: sentence=”This is a lovely day and this day could be your best day, if you smile” Count how many times the word ‘day’ (substring) is appearing in the above sentence (string) Solution 1 sentence=”This is a lovely […]