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.
Added
Added
I think its fixed now. Evaluated expected first.
Instead of flagging for "big inputs", maybe it's more useful to know what the worst case time complexity of the algorithm should be.
What's the expected time complexity of the algorithm?
You're probably doing something like n + (n-1) + ... + 1 = n(n+1)/2 operations, which is the naive solution.
This can and should be done in linear time.
Great kata!
In Haskell, is there a reason for implementing the tree with Maybe instead of simply:
Tree a = Null | Node (Tree a) a (Tree a)
?
As already mentioned, Haskell doesn't have random tests and test cases should also be at least > 30 so that codewars.com/kata/reviews/57a1d5f8969dcdd2290000a7/groups/612a6e5f92c3410001a2212b doesn't pass.
Thank you for this. This is much more helpful.
It literally is. The correct formula for costs is total_buying_transactions_worth + total_depreciation + total_interest - materials_left while the description says total_selling_transactions_worth + total_depreciation + total_interest. - ok I can see how one could interpret it this way.
It's not explained how Revenue (RESULT) is calculated - added
It's not explained how Cash (ASSETS) is calculated - How is this not self-explanatory? You have money, buy things and then you have less money. Sell things and you have more money. All things affecting the cash are listed.
It's not explained how Loans (LIABILITIES) are calculated - is it really not clear that you should sum the values of all loans? And after making payments on a loan, less money is owed?
The given formula for Costs (RESULT) is plain wrong - No, I think you are mistaken. How is it wrong?
I updated the description. Maybe you should be more precise about how your issues are calculated or else this is just formulas-guessing. "Without doing anything" is simply a false statement. As the description is now, what is it that you have trouble understanding?
.
.
Thank you for beeing a decent human being. I will add this.
Loading more items...