Ad
  • Custom User Avatar

    Index did nothing in this case, you scanned too much rows to bet useful.
    Don't use it mindlessly at least count records before adding it to see if there is prospect for index use.

  • Custom User Avatar

    One of the tests expect (in JS) :
    "Expected: 'twenty one minutes to seven'"

    Is this correct maybe people say it like that, i don't know :D ?

  • Custom User Avatar

    Super good kata. Not only for exercise itself
    but on ways to approach the problem and organize
    the code. I saw solutions ranging from 20 - 170 lines
    it just says how much organizing code can be challenge of itself.

    Very sad that this kata have low traction it should be base line exercise to programmers.

  • Custom User Avatar
  • Custom User Avatar

    In other words, what hobovsky is saying is that you need to make a copy of input array.

  • Custom User Avatar

    Yes your loops take too long, after solving checked other people performance (in JS, wonder how C could improve) it was 8,5 - 11 s, so it is quite tight.
    This should be a hint to you, that you have to rethink your solution and be VERY conservative with rereading array values to the point of reading only ...

  • Custom User Avatar

    "while (true)" conditions always seem wonky to me, not that it is bad but makes it harder to read code,
    since it makes it more jumpy and non linear, when you look for loop termination condition.

  • Custom User Avatar

    With math you are moving in the good direction.
    As for implantation, you know that you have problems with larger numbers and still do multiplication.
    Just look at "numerator = 2757240" in the description example, thats crazy.
    Try to work out math further to by pass this, so that you would not have such a larger number at one point of time.

  • Custom User Avatar

    Add code next time, it is hard to tell what the problem is.
    As for test "Expected: Henry's socks", this hides with what values code was checked it is not the answer.

  • Custom User Avatar

    Punky have to have different color socks by description.
    Since list contains only socks of one color no viable combination is possible.
    In these cases description says to return empty array (or some equivalent in python).

    I suggest to add some extra validating logic at the end of solution.

  • Custom User Avatar
  • Custom User Avatar

    For all who could stumble here on this old exercise, test don't check for true randomness.
    You HAVE to have at least one of each letter in result array.

  • Custom User Avatar

    This part "You can access the database as drunkenDoodling/drunken_doodling/DrunkenDoodling depending on your language."
    Should be included in language solution frame, something like for JS :

    function bob() {
    // Use 'drunkenDoodling' dictionary for monster response
    return;
    }

  • Custom User Avatar

    Description is little confusing, so my feedback what i see :
    Description has all needed information, but somehow reading it brain skips the info :D
    Changes minor so you can ignore this.

    From :
    Write a function where, given an array of numbers (the numbered cards played) and a second parameter (# of wager cards played), will calculate a player’s score.
    To :
    Write a function where, cardsArr ( array of numbered type cards played) and wager (count of wager type cards played), will calculate a player’s score.

  • Custom User Avatar

    Read the description twice before posting and still missed it. Damm.

  • Loading more items...