add the solution of remove element in leetcode and refactor code