diff --git a/python/remove_duplicates_from_sorted_array.py b/python/26_remove_duplicates_from_sorted_array.py similarity index 100% rename from python/remove_duplicates_from_sorted_array.py rename to python/26_remove_duplicates_from_sorted_array.py diff --git a/python/remove_element.py b/python/27_remove_element.py similarity index 100% rename from python/remove_element.py rename to python/27_remove_element.py diff --git a/python/28_find_the_index_of_the_first_occurrence_in_a_string b/python/28_find_the_index_of_the_first_occurrence_in_a_string new file mode 100644 index 0000000..d843ed9 --- /dev/null +++ b/python/28_find_the_index_of_the_first_occurrence_in_a_string @@ -0,0 +1,6 @@ +class Solution: + def strStr(self, haystack: str, needle: str) -> int: + for i in range(len(haystack)): + if haystack[i:i+len(needle)] == needle: + return i + return -1 diff --git a/python/minimum_operations_to_exceed_threshold_value_i.py b/python/3065_minimum_operations_to_exceed_threshold_value_i.py similarity index 100% rename from python/minimum_operations_to_exceed_threshold_value_i.py rename to python/3065_minimum_operations_to_exceed_threshold_value_i.py diff --git a/python/minimum_operations_to_exceed_threshold_value_ii.py b/python/3066_minimum_operations_to_exceed_threshold_value_ii.py similarity index 100% rename from python/minimum_operations_to_exceed_threshold_value_ii.py rename to python/3066_minimum_operations_to_exceed_threshold_value_ii.py