<p>Given two strings <code>needle</code> and <code>haystack</code>, return the index of the first occurrence of <code>needle</code> in <code>haystack</code>, or <code>-1</code> if <code>needle</code> is not part of <code>haystack</code>.</p>
<p>For the purpose of this problem, we will return 0 when <code>needle</code> is an empty string. This is consistent to C's <ahref="http://www.cplusplus.com/reference/cstring/strstr/"target="_blank">strstr()</a> and Java's <ahref="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(java.lang.String)"target="_blank">indexOf()</a>.</p>