Accepted 2 line C# solution


  • 0
    V
    public class Solution {
        public int StrStr(string haystack, string needle) {
            int occurs = haystack.IndexOf(needle);
            return occurs;        
        }
    }

Log in to reply
 

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