[Problem] Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. [Solution] It is quite simple! 1) First, check a length of 'haystack' is shorter than a length of 'needle'. If it is, return -1. 2) Second, before checking all characters between haystack and needle, I checked the last character and the first t..