finish leetcode_311.
finish leetcode_312