LeetCode: strstr, remove element