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.
Assumes all numbers are in range, returns error for if not.
this must be the guy who made chatgpt
https://www.geeksforgeeks.org/python-list-comprehensions-vs-generator-expressions/
??
Here I thought I was being clever... and completely overlooked the simpler solution.
As little-voted as it is right now for best practice, I ran some benchmarks on BenchmarkDotNet out of curiosity and multiplying a number with itself is magnitudes faster than using Pow(n, 2). This is the one
This produces the character for every single element of inp. Kind of slow?
this is a good one
Think of it as any method that returns either a 1 or a 0. The implementation of it in this case is arbitrary since it is implemented by the caller and not within the method that is being tested.
nice :)))
This comment is hidden because it contains spoiler information about the solution
Wouldn't a set be technically faster to check membership than a string, because it's implimented using a hash table (in Python)? e.g. {'a', 'e', 'i', 'o', 'u'}
good logic...please tell me for have good logic thanks ^_^
I forgot you could do this:
public constructor(public length: number, public width: number, public height: number) { }
This is a trick using something called "parameter properties". You can read about them here: https://www.typescriptlang.org/docs/handbook/classes.html
"Parameter properties are declared by prefixing a constructor parameter with an accessibility modifier or readonly, or both. Using private for a parameter property declares and initializes a private member; likewise, the same is done for public, protected, and readonly."
I think Ship constructor shouldn't have implementation of it how worthIt is calculated.
Loading more items...