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.
Yeah, really. They're not the same.
But because there is no proper order in XCTAssertions, it could be your answer is right and the expected one is wrong, please elaborate.
This comment has been deleted.
XCTAssertEqual failed: ("h(t) = -16.0t^2 + 17.880t + 51.0") is not equal to ("h(t) = -16.0t^2 + 17.88t + 51.0") -
XCTAssertEqual failed: ("x(t) = 83.070t") is not equal to ("x(t) = 83.07t") -
R E A L L Y ???
what's the point of this AI slop reply
Uses a lazy collection to filter and sum the multiples. This is memory efficient because it doesn't create an intermediate array.
Code is straightforward and easy to follow.
I like this clean and concise, follows Swift best practices. Simple split and map operations make it easy to understand.
Innovative use of a dictionary for transformation - great for readability and maintainability.
Efficient and direct approach without unnecessary reversals. Good readability.
Initial code's return type is still the outdated one.
Converting the string to an array is an unnecessary step since you can iterate over a string directly.
Ok, I add this to preloaded section.
Tests are now using
TrachtenbergResult
, but this type is not defined in Preloaded, and the initial code is not updated to use it (the return type is still[(Int, String)]
).Thank you for reviewing my kata and for your valuable feedback. I appreciate your point about ensuring the description is self-contained and will make the necessary updates to include a clear specification of the Trachtenberg method. You're right; multiplying by two is quite straightforward. This kata is part of a series I plan to create, focusing on more complex multiplications using the Trachtenberg method, which should be more challenging and interesting. As this is my first kata, I'm excited to explore this unique system further and share it with the community. Thanks again for your insights!
A description should be self-contained, and examples should not contain necessary specifications ( ie, the description should still be complete when skipping the examples ). The current description is thus missing a specification section for the Trachtenberg method; being able to reverse engineer it from the example is insufficient.
Apart from that, I sincerely doubt multiplying by two is interesting in itself, or by the Trachtenberg method, seeing how doing it by that method really doesn't add anything to the way I'd normally do it in my head ( and I'd never heard of this method before ). Maybe showcase the method better ( cq actually showcase it ) with a more complicated multiplication?
Loading more items...