Totally have no idea -- why runs well locally but have a runtime error on leetcode