LEGO

Report a typo

From the list of actions below, make up an algorithm for checking the existence of a pattern in a text.

Put the items in the correct order
If the characters match, compare the next character of the text with the next character of the pattern
Compare the first character of the text with the first character of the pattern
Continue to repeat the algorithm until you reach the end of the text or you find a pattern
If the characters don't match, compare the next character of the text with the first character of the pattern
After the comparison, consider first the coincidence of characters, and then the mismatch
___

Create a free account to access the full topic