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.
Need to add in the description the minimum year IMHO.
Or the range of dates for test cases.
FInally, here it is: https://www.codewars.com/kata/histogram-h2
Needs random tests
Nice solution!
Problem persists
This comment is hidden because it contains spoiler information about the solution
Hi there, I am glad, that you enjoyed this Kata. I have fixed addressed issue, thank you for the feedback!
I really enjoyed this Kata, good job! Just two observations:
In JAVA, you either need to change the tests or make the getValidHours() method static.
Also, the dd.mm.yyyy format is slightly misleading because in JAVA it is not the same as dd.MM.yyyy (and the latter is the actual format of the input).
Thanks for your good suggestion. I will consider it for when I make more in this series.
Meanwhile, if you enjoyed this Kata please try its sibling
Histogram - V1
:-)I enjoyed this Kata, but it would be more interesting if you would have to calculate percentage of maximal volume and show that (find max value, then divide actual value by it and show 0-10 hashes).
Please can you post Kata-specific problems on the discourse page for that Kata instead of the forum which is for general topics. Each Kata has an automatic discourse page in which you can mark your comment as a question, which means it's easier for me to help (since it's easier to find). Also, since this is a forum page, I can't mark your comment as a spoiler, meaning people can look at your code and use it themselves, however on the discourse page I can hide your solution.
Regarding your problem, change
return 1
toreturn n
because you want it to start counting at 1 and not 2 (1 + 1 = 2, whilst 0 + 1 = 1), which causes the program to become 1 step (loop) above what it should be.[HIDDEN]
this is my code for memoisation ,but i am getting wrong eith this
exampal:::: of 10 i am getting 89 but answer of codewar is 55
i am getting 55 at 9
so what is wrong with this code
Hello there, I would like to know, whether you would be interested in more Katas as is this in series https://www.codewars.com/kata/582e2448fe38019857000038 . I would like to make something, what I do in practice and what you might find interesting. :-)
Well, it's little bit faster than calculating factorials everytime, right? :-)
I find this solution great in terms of performance and simplicity. This is the clever and non-lazy way :-)