revised leetcode_33 to 42