From f7012a3c03a61bdd64ed56084752fe34ab89f2e8 Mon Sep 17 00:00:00 2001 From: Sandeep Pal Date: Fri, 25 Aug 2023 07:49:36 +0530 Subject: [PATCH 1/2] Create 028_Find-the-Index-of_the_First_Occurrence_in_a_string.py --- ...028_Find-the-Index-of_the_First_Occurrence_in_a_string.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py diff --git a/028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py b/028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py new file mode 100644 index 0000000..0403348 --- /dev/null +++ b/028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py @@ -0,0 +1,5 @@ +class Solution: + def strStr(self, haystack: str, needle: str) -> int: + index: int=-1 + index=haystack.find(needle) + return index From d7dc571c5c247c822cecb89b00d77bf3e8c659bb Mon Sep 17 00:00:00 2001 From: Sandeep Pal Date: Fri, 25 Aug 2023 07:51:50 +0530 Subject: [PATCH 2/2] Rename 028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py to 028_Find-the-Index-of_the_First_Occurrence_in_a_string.py --- ...y => 028_Find-the-Index-of_the_First_Occurrence_in_a_string.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py => 028_Find-the-Index-of_the_First_Occurrence_in_a_string.py (100%) diff --git a/028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py b/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py similarity index 100% rename from 028_/028_Find-the-Index-of_the_First_Occurrence_in_a_string.py rename to 028_Find-the-Index-of_the_First_Occurrence_in_a_string.py