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.
So clean!
PowerShell is case insensitive by default.
Currently any solution that removes the "_" and "-" will pass all tests because the case of the resulting string doest matter.
The "Should -Be" is case insensitve per the Pester docs: https://pester.dev/docs/v4/usage/assertions#beexactly
To solve this "Should -BeExactly" should be used.
Compare-Object is case insensitive unless the "-CaseSensitive" flag is provided: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/compare-object?view=powershell-7.3
To solve this issue the "-CaseSensitive" parameter should be specified.
cool
It appears C# is still broken:
I just failed a random test where the input was [9, 9, 33]. It says the expected output is 0. However, there is an example in the problem explination where the input is [2, 2, 2] and the output is 2.
In the example of [9, 9, 33] the output should be 9 (the value of the start number).
I agree. I just failed a random test where the input was [9, 9, 33]. It says the expected output is 0. However, there is an example in the problem explination where the input is [2, 2, 2] and the output is 2.
In the example of [9, 9, 33] the output should be 9 (the value of the start number).
yep, you saw the most important one (beginning of the 3rd §). You still can use one more (see the fork of my solution or anter's one). ;)
note: spoiler flag, plz, when you post strong indications about the approach.
This comment is hidden because it contains spoiler information about the solution
fun fact is: your solution is slower because it misses some other kind of optimization. ;)