Ad
  • Custom User Avatar

    Not sure that this is necessarily an issue (as the variables already include the word string and example testcases have the binary strings as strings), but have added quotes around the strings in the it block

  • Custom User Avatar

    Use repr or wrap the input in quotes for it block, otherwise it can be easily misleaded as inputs being integers

  • Custom User Avatar
  • Custom User Avatar

    In the sample tests tester("11000", "01111", 4, 1):

    Remove components 1 and 2, price of 1, quality of 4

    Isn't it :

    Remove component 1, price of 1, quality of 4

    To prevent bad understanding, maybe add in the description that indices are 1-based in your sample tests.

  • Custom User Avatar

    Fancy coding challenge just for the holidays, happy ones everybody then.

  • Custom User Avatar

    Yeah this works too

  • Custom User Avatar

    I do agree that the description is a bit hard to read, so thank you for the fork. My main concern with your fork is that it doesn't mention anything removing elements, only "optimizing the gift production", which I feel is unclear. Additionally, though this might be due to the fact that I'm used to the formats of other sites, but I feel the large amount of headers do clutter the description, and information could be more easily condensed. I've made a fork of your work, and would like to know your thoughts on it.

    Thanks! (changing it in the meantime just to replace the current description)

  • Custom User Avatar

    The description is hard to read: see suggested description update. See if you like this update or not.

  • Custom User Avatar

    Could you explain how you got 1201, because 2110 is the correct answer. You should make it so the digits are sorted in descending order (essentially a greater number comes before a lesser number, and we can see that your answer is incorrect as 1 comes before 2, but 2 is a greater digit

  • Custom User Avatar

    Let's just say the "state of the art statistical model" isn't really accurate.

    (I'm presumming you are talking about cases such as n = 5, score = 7, but I'd say that's covered by the "If this is not possible, return -1" part, if you're referring to something else, please clarify in a comment)

  • Custom User Avatar

    There are times where the opponents given score is impossible.

  • Custom User Avatar

    I agree that Nothing or None is preferable to -1, but I just kept things consistent with the description.

  • Custom User Avatar

    That is the correct application of the English language. Just try saying a O(n), you sound like an absolute pillock greeting their mate Owen.

    Anyway I fixed it.

  • Custom User Avatar

    I believe we should return Nothing in Haskell instead of -1. In fact, in Python it should also be better to return None.

  • Custom User Avatar

    I used "an" because the first syllable is a vowel sound, an personally sounds better to me. That being said, I can find both uses on google, and I don't think it's something to worry too much about, though I agree with Kayleigh that an O(n) is correct

  • Loading more items...