oj leetcode problem solution