fast and easy


  • 0
    L

    class Solution {
    public:
    int strStr(string haystack, string needle) {
    int p = haystack.find(needle);
    if (p >= 0) return p;
    return -1;
    }
    };


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.