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.
This comment is hidden because it contains spoiler information about the solution
I'd suggest to add 120 and 2016 to test suite, see code for my solution for more info.
I can imagine certain edge cases with calculation of compounding depending on how the person withdraws money.
E.g. with example from the problem.
f0 = 100000, p = 1 percent, c0 = 2000, n = 15, i = 1 percent
If person withdraws money on Dec 31 of year 1, then f1 = 100000 * 1.01 - 2000 = 99000, but if person withdraws money on Jan 01 of year 1, then f1 = (100000 - 2000) * 1.01 = 98980
I guess you can either rephrase the problem with "withdraws at the end of the year" that'd apparently match the test cases or make the whole kata slightly more complicated :)
This comment is hidden because it contains spoiler information about the solution
Test case is not compilable:
/tmp/haskell116115-17-1qudwmy/Codewars/Kata/FirstCharacter/Test.hs:11:32:
No instance for (Show a0) arising from a use of
shouldBe' The type variable
a0' is ambiguousIn a stmt of a 'do' block: firstDup []
shouldBe
NothingTests are (apparently) still broken:
/tmp/haskell11618-18-143uzzq/FindingAnAppointment/Test.hs:43:28:
Ambiguous occurrence
shuffle' It could refer to either
FindingAnAppointment.Test.shuffle',defined at /tmp/haskell11618-18-143uzzq/FindingAnAppointment/Test.hs:72:1
or
Test.QuickCheck.shuffle', imported from
Test.QuickCheck' at /tmp/haskell11618-18-143uzzq/FindingAnAppointment/Test.hs:4:1-22(and originally defined in `Test.QuickCheck.Gen')
For goodness sake, how is this trivial thingie a "6 kyu" problem?
Have you tried to run it with arguments being length=1 and width=100000000?
Garbage collector would hate you for such kind of coding.