Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Is there any difference between importing the library first opposed to doing Math.abs() ?
It is not best practice. The same people that go on leetcode that demands more of them and then downvote the problem come here to do their shenanigans and upvote the clever answers and call them a best practice. Bunch of 12 year olds.
This comment is hidden because it contains spoiler information about the solution
I agree. it's not best practise, but it is clever :)
I don't think it's the best practice. It's less code, however, it's much more resource consuming than a simple condition.