Ad
  • Custom User Avatar

    No, it popped up because C got approved - you were first.

  • Custom User Avatar

    On the other hand, maybe I was too quick to dismiss. I didn't want a merge conflict on my translation; eight years on a sweet and short description and the minute I make a translation somebody wants to change it ..

    ( I like short descriptions. )

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Unless it's explicitly specified, I would expect numbers to be in normal integer range ( not arbitrary precision integer range. call it 32-bit ints. ). And up to, oh, about 100 or so. That is what I would expect.

    And that should not be a problem for reasonably efficient code. So unless you're being extraordinarily inefficient ( which would be unexpected, given that the algorithms are fairly well known and, if you don't know them, one or two clicks away ), or certain translations have much more intensive testing than I have seen actually happening in the languages I've seen, you will never run into trouble. Despite this being a 5. ( It's an old kata. )

    Unless testing parameters are outside reasonable, to-be-expected ranges, I see no reason to show us the limits of testing. Because you will not run into them.

    Mollycoddling solvers is overrated.

  • Custom User Avatar

    From any index=n, you can go at the next pyramid level only to: n or n+1. 2 can go to 8 or 5, 4 can go to 5 or 9 and so on.

  • Custom User Avatar
  • Custom User Avatar

    They don't change.

  • Custom User Avatar

    I guess you're not yet going to be a manager today. :P

  • Custom User Avatar

    Did you remove the python translation? I can not see it anymore.

  • Default User Avatar
  • Custom User Avatar

    Yep, looks like the correct version. :]

  • Custom User Avatar

    Ranks of approved katas cannot be changed (well, it can, by sending the kata back to beta, but it's a long and painful process, with no guarantees, particularly with old katas like this one). See there to understand how katas are ranked: https://docs.codewars.com/concepts/kata/beta-process/

    Many times, old katas tend to be overranked in comparison with current criterias. However, this is not something that can be handled here.

    The best way to have better rankings is to have more users involved in beta validation process.

  • Custom User Avatar

    Yeah, you're missing the inner loop filling the order list.

    Free advice, worth what you paid for it: factor out random range generation ( I like rnd = (m,n=0) => Math.random() * (n-m) + m | 0 ; ), and factor out list generation. You can even generate increasingly larger lists of increasingly larger numbers by using the test index as a max size for the respective random generation.

  • Custom User Avatar

    @Unnamed had one look at it and had a simplification .. there's something to be said for two pairs of eyes on it. :P

    If you haven't changed the description, you can approve this ( it does have the empty order list ); otherwise it's probably easier to reject this and apply the diff manually.

  • Custom User Avatar

    No worries! - I know how ridiculous Haskell syntax looks to people who don't know it. :D

    I don't do Python, so I only saw the kata when you translated it, or I might have translated it earlier - it's a fun problem with a fun solution. Cheers for creating the kata!

    Haskell's syntax is not the only peculiarity - it's also completely pure, and lazy. It's a fascinating language that does things completely different from any other language I know. Lots of underlying mathematical concepts, but you don't need to know those in advance - you just learn them while, or even after, learning Haskell. If you're interested, search for "Learn you a Haskell" - but prepare for the ride of your life, and don't expect to read, let alone write, that random testing code within a year. :P

  • Loading more items...