The description does not specify that nums will always have one or more numbers.
And it's usually a good practice to check that a value is not zero before dividing something by it.
What is the purpose of the last part? There isn't a case where nums doesn't exist.
Loading collection data...
The description does not specify that nums will always have one or more numbers.
And it's usually a good practice to check that a value is not zero before dividing something by it.
What is the purpose of the last part? There isn't a case where nums doesn't exist.