revert bits and edit distance from leetcode updated