Why using one line solution is not so good?

  • 0

    There are some solutions using some built in method to solve this problem? But almost every one got down vote, why?

  • 0

    Because it is so trivial.

    We can not learn or practice from such trivial solutions.

    However in real world, it is often unnecessary to reinvent the wheel, so please use the built-in functions freely...:-)

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.