revised util leetcode_71 inclusive