leetcode 005 fixed