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.
Please make sure to make a note of performance and the demands of the test suite... its easy to get a time-out
This comment is hidden because it contains spoiler information about the solution
Retired.
Approved
fixed
description updated
You link to a flashgame. Flash is dead and not supported anymore by any major browser.
Maybe link to this: https://www.mathsisfun.com/games/towerofhanoi.html
Ruby 3.0 should be enabled, see this to learn how to do it
It's better the class name starts with upper letter.
Not a suggestion.
C translation kumited
please scrutinize for approval
Fixed. Thank you for reporting.
Fixed. Thank you for reporting.
There are quite a few problems with that solution.
First of all, it's incorrect. It divides the timeline into four year periods and assumes that each first year is a leap year. But the first year of the epoch (1970) is not a leap year.
Second, it may access
monthTime
out of bounds. If the timestamp is from somewhere in december, it checkstimestamp >= monthTime[monthIndex + 1]
, i.e.monthTime[12]
.Third, it leaks memory. It dynamically allocates memory in the constructor (
monthTime = new int[12]
) and ingetDate()
(monthArr = new std::string[12]
) but never releases it.I assume that you have abandoned this kata because you haven't responded to the comments for the last seven months. I'm going to fix the kata because it's a nice task and deserves a well written kata.
Loading more items...