Thursday, April 25, 2024

📑 Substring Counting

📑 Task

1) What result will the program produce?
2) Simplify the program to improve counting speed

📑 Answer

1) The program will return the number 3 by counting
the number of occurrences of the substring in the string
2) In the program it needs to replace recursion with a loop

No comments:

Post a Comment