algorithm notes: leetcode#723 candy crush