Test-driven development

This is one of the lowest AC rate problems on leetcode.

Maybe no one can cover all the edge test cases at the first time. But after a lot of submittions, everyone's code can be accepted.

Such(k) technology is known as Test-driven development.