#01 Find the index of the first occurrence in a string - Leetcode 28 [LeetCode Solutions]
Жүктеу.....
Пікірлер: 8
@ahmedtharwat617911 күн бұрын
شكرا جدا يا باشمهندس
@Salah-ur2gc Жыл бұрын
جزاك الله كل خير 💚
@ahmedsamiabdelalim6783 Жыл бұрын
عاااااااااااش كمل يا بشمهندس السلسه🥰🥰 جزاكم الله خيرا
@mohammedkhaled7914 Жыл бұрын
شكراً جداً يعطيك ألف عافية
@soubhimal5948 Жыл бұрын
ربنا يديك الصحة
@abdomahmoud87695 күн бұрын
انا حليته بدون اى built-in funcs class Solution { private: short int haystackLength; short int needleLength; short int checkCorrespondingLetters(string haystack, string needle, short int start) { for (short int i = 1; i if (needle[i] != haystack[start]) return -1; start++; } return 1; } public: short int strStr(string haystack, string needle) { haystackLength = haystack.length(); needleLength = needle.length(); for (short int i = 0; i if (haystack[i] == needle[0]) { if (checkCorrespondingLetters(haystack, needle, i + 1) == 1) return i; } } return -1; } };
Пікірлер: 8
شكرا جدا يا باشمهندس
جزاك الله كل خير 💚
عاااااااااااش كمل يا بشمهندس السلسه🥰🥰 جزاكم الله خيرا
شكراً جداً يعطيك ألف عافية
ربنا يديك الصحة
انا حليته بدون اى built-in funcs class Solution { private: short int haystackLength; short int needleLength; short int checkCorrespondingLetters(string haystack, string needle, short int start) { for (short int i = 1; i if (needle[i] != haystack[start]) return -1; start++; } return 1; } public: short int strStr(string haystack, string needle) { haystackLength = haystack.length(); needleLength = needle.length(); for (short int i = 0; i if (haystack[i] == needle[0]) { if (checkCorrespondingLetters(haystack, needle, i + 1) == 1) return i; } } return -1; } };