Ad
  • Custom User Avatar

    IIRC I must have completed all the kata in this series that way: a nice extra challenge is always nice. And glad to know I hit in the right spot ;)

  • Custom User Avatar

    Oh, sorry for your loss and best of luck for your future; your dedication surely must earn you a second (and third and fourth) chance!

    To my partial excuse, I did use a rich list comprehension in the code to generate the test array, just in case you want to hit the "train again" button and see them:

    order=reduce(lambda x,y: x+y, [[randint(1,50)]*randint(1,10)for i in range(randint(3,10))])
    shuffle(order)
    
  • Custom User Avatar

    Mh, this one was a bit hard to think in terms of list comprehension and I like to think of the few constructs I know in terms of tools, not chain.

    That said, my solution quite sucked as I used an unnecessary counter, but ok: it's one of my worse latest katas and I deserve full shame out of it.

    You will sureyl get my everlasting praise if you can do it with one or more list comprehensions ;)

    Oh, while at it, as otherwise I keep forgetting it: is it ok if I happen to mention you as a strong achiever on Quora or anywhere else? I was about to write about your accomplishments in a reply a few days ago, but then stopped thinking that it was unpolite to do so without your consent.

    Let me know and keep up the good work :)

  • Default User Avatar

    Thanks for your feedback! Your solution is very good!