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.
In golang when you pass a parameter to a function it will make a copy of it, unless pointer type is specified (eg
arr *[]int
). So this function is pure.This comment is hidden because it contains spoiler information about the solution
i dont understand why this is best practice. this code just iterates throw every number... ofc it ll word fine with input 100000, but if we try to calculate 10000000000000 it ll work half day...
better to use tuple instead array