added solution to leetcode_77