We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb928c3 commit 007a4f6Copy full SHA for 007a4f6
1 file changed
searches/z.algorithm.search.r
@@ -31,7 +31,8 @@ text <- tolower(readline("Enter text: "))
31
pattern <- tolower(readline("Enter pattern: "))
32
33
matches <- z_algorithm_search(text, pattern)
34
-if (length(matches) > 0)
+if (length(matches) > 0) {
35
cat("Pattern found at positions:", matches, "\n")
36
-else
37
- cat("Pattern not found.\n")
+} else {
+ cat("Pattern not found.\n")
38
+}
0 commit comments