From 63d0c229efbfdb47b58224273ad246ea6dd39f01 Mon Sep 17 00:00:00 2001 From: Suheb Ali Date: Sat, 1 Oct 2022 06:11:56 +0530 Subject: [PATCH] Day-25 Solution by Suheb --- Day - 25/Day-25_Suheb.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Day - 25/Day-25_Suheb.cpp diff --git a/Day - 25/Day-25_Suheb.cpp b/Day - 25/Day-25_Suheb.cpp new file mode 100644 index 0000000..b1f2f1c --- /dev/null +++ b/Day - 25/Day-25_Suheb.cpp @@ -0,0 +1,22 @@ +#include +using namespace std; + +int isSubstring(string s1, string s2){ + + if (s1.find(s2) != string::npos) + return s1.find(s2); + + return -1; +} + +int main(){ + + string s1 = "helloworld"; + string s2 = "low"; + + int res = isSubstring(s1, s2); + cout << res; + + return 0; +} +