From 4778a0b693d751b21b243dea343fe0603b0b26d2 Mon Sep 17 00:00:00 2001 From: miguel Date: Wed, 24 Jul 2024 10:16:56 +0100 Subject: [PATCH] docs(hiddenp) fix subject of hiddenp --- subjects/hiddenp/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/subjects/hiddenp/README.md b/subjects/hiddenp/README.md index 489165452..480fa62c4 100644 --- a/subjects/hiddenp/README.md +++ b/subjects/hiddenp/README.md @@ -2,13 +2,13 @@ ### Instructions -Write a program named `hiddenp` that takes two `string` and that, if the first `string` is hidden in the second one, displays `1` followed by a newline (`'\n'`), otherwise it displays `0` followed by a newline. +Write a program named `hiddenp` that takes two `strings` as arguments. The program should check if the first string `s1` is hidden in the second `s2`. +`s1` is considered hidden in `s2` if it is possible to find each character from `s1` in `s2`, in the same order as they appear in `s1`, but not necessarily consecutively. -Let s1 and s2 be `string`. It is considered that s1 is hidden in s2 if it is possible to find each character from s1 in s2, **in the same order as they appear in s1.** - -If s1 is an empty `string`, it is considered hidden in any `string`. - -If the number of arguments is different from 2, the program displays nothing. +- If `s1` is hidden in `s2`, the program should display `1` followed by a newline. +- If `s1` is not hidden in `s2`, the program should display `0` followed by a newline. +- If `s1` is an empty string, it is considered hidden in any string. +- If the number of arguments is different from 2, the program should display nothing. ### Usage